Mixing branches

Updated 4 July 2019

Using one branch

Stable

The ACCEPT_KEYWORDS variable define whether to use the testing or the stable branch. By default, the stable version is used, as in x86.

Testing

If you need the latest software, consider switching to the testing version. To tell Portage to go testing, prefix your architecture with ~.

Testing means testing, indeed! I.e. by marking a package as testing, the developers consider that it is usable, but it has not been thoroughly tested. You may be the first person to come across a bug. In this case, you can create a [bug report] (https://bugs.gentoo.org) to let the developers know about it.

However, be prepared to face problems with stability, poor package support (e.g. wrong/missing dependencies), too frequent updates (resulting in frequent compilation) or inability to build a package. If you are not familiar with the system and not sure how to address problems that may arise when using it, we recommend that you stick to the stable, well-tested branch.

For example, to switch to testing on the x86 architecture, edit the make_conf file, as shown below:

/etc/portage/make.conf/custom

ACCEPT_KEYWORDS="~x86"

If you run a system update now, you will see that many packages need to be updated. Note that once you have migrated to the test branch and updated your system, there is usually no easy way back to a stable official branch (except, of course, using a backup).

Using stable and testing packages together

package.keywords location

You can tell Portage to use the testing branch for specific packages and stay stable for the rest. To do this, add the category and the name of the package you want testing. Create a file under any name in /etc/portage/package.keywords/ or edit /etc/portage/package.keywords/custom. For example, if you want to get testing updates for the gnumeric package, please add:

/etc/portage/package.keywords/custom

app-office/gnumeric ~x86

Testing specific versions

If you want to use a particular version from the testing branch, but do not want Portage to use it for future updates of this application, you can specify the number of the required version in the package.keywords location. You must use the = operator. You may also specify a range of versions using <=, <, > or >= operators.

You must use any of those anyway if you need a particular version or versions. These operators cannot be used if a version is not specified.

For instance, tell Portage to let you install gnumeric-1.2.13:

/etc/portage/package.keywords/custom

=app-office/gnumeric-1.2.13 ~x86

Intalling blocked packages

package.unmask location

If you want to use a blocked package whatever the reasons, create a file in the /etc/portage/package.unmask directory and edit it by adding the same line.

For example, if =net-mail/hotwayd-0.8 is blocked, you can unblock it by writing the same line in package.unmask:

/etc/portage/package.unmask/custom

=net-mail/hotwayd-0.8

package.mask location

If you do not want Portage to use any particular software or specific versions of an application, you can block it yourself by acreating a file in /etc/portage/package.mask and adding the corresponding entry to it.

If, for example, you do not want Portage to install a newer kernel than ~calculate-sources-2.6.36.3~~, add that line to package.mask:

/etc/portage/package.mask/custom

>sys-kernel/calculate-sources-2.6.36.3