Knowledge Base:Accepting a keyword for a single package

Synopsis
During installation of a package, Portage complains that the package can only be installed if a keyword change is made:

Environment
Any Gentoo Linux environment.

Analysis
Every Gentoo ebuild (package) has a set of KEYWORDS it complies with. These keywords identify for which architectures the ebuild is installable, and if the ebuild is stable (no prefix) or still in testing phase (prefixed by ).

When trying to install the package, Portage found that the only way it can honor the request (either because you asked the package, or because it is being pulled in as a dependency) is if you tell Portage that it can install the ~arch version of a package. In the example above, it would be ~amd64 since the system on which the example is tried is an amd64 architecture (x86_64).

In certain cases, the package is defined with no KEYWORDS content. In this specific case, Portage will suggest to use the special  keyword to override.

Resolution
This assumes that you really want to install the testing ebuild. If you believe this is an error (you do not want to install the testing ebuild but the stable ebuilds do not suffice for the installation), check with the Gentoo developers and, if necessary, open a bugreport.

Using
Re-running the command with  automatically queues the required text file alteration:

As with all conf files, the final update is made by running dispatch-conf (or alternatively ):

Examine the diff output, press  to exit the pager (if you don't see commands at the end), and then   for   if you want to accept the alterations.

Finally, re-run the emerge one last time:

Using traditional files
Create the directory if it does not exist yet:

Add the required line:

Using directories
Create the directory if it does not exist yet:

Next, create a file in which you tell Portage which ebuilds you want to accept for installation. For instance, if you try to install Term-ScreenColor and Term-Screen fails, you can create a file named (so you know why you deviate from the standard keywords) in which you put the Term-Screen deviation:

Additional notes
To also let in -r# package revisions which may contain immediately beneficial updates, replace the leading  (equals sign) with a   (tilde):

The keyword itself can usually be omitted:

If you always want to install the latest testing version, drop the leading  or   as well as the version at the end:

If the mask is because no KEYWORDS are defined, use the  notation: