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:

[ebuild N    ~] dev-perl/Term-Screen-1.30.0

The following keyword changes are necessary to proceed: =dev-perl/Term-Screen-1.30.0 ~amd64
 * 1) required by Term-Screen (argument)

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
The following resolution 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.

Create the /etc/portage/package.accept_keywords 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 Term-ScreenColor (so you know why you deviate from the standard keywords) in which you put the Term-Screen deviation:

If you always want to install the latest ebuild (including those in testing phase) regardless of version, drop the version information:

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