Gentoo can block a package version that carries only a testing keyword. A package-specific package.accept_keywords entry unmasks that version for your architecture without switching the whole system to testing.

package.accept_keywords changes accepted keywords for specific package atoms. It is safer than setting ACCEPT_KEYWORDS="~amd64" globally in /etc/portage/make.conf because only the named package, or the exact version named in the atom, can cross from testing keywords into the merge plan.

An available testing keyword such as ~amd64 is different from missing keyword, which means no suitable keyword is declared for your architecture. A package.mask entry, license restriction, unsupported EAPI, or dependency blocker also needs its own resolution; accepting a testing keyword does not override those restrictions.

Steps to unmask a Gentoo package keyword:

  1. Check the exact package version for a testing keyword mask.
    $ emerge --pretend '=app-misc/tty-clock-2.3'
    ##### snipped #####
    !!! All ebuilds that could satisfy "=app-misc/tty-clock-2.3" have been masked.
    !!! One of the following masked packages is required to complete your request:
    - app-misc/tty-clock-2.3::gentoo (masked by: ~arm64 keyword)
    ##### snipped #####

    Your own atom is the package and version emerge reports. The All ebuilds that could satisfy … have been masked message is a summary; the masked by reason names the blocker. The examples use arm64; on amd64, the same error reads masked by: ~amd64 keyword.

    A missing keyword or package.mask reason is a different block that this entry cannot clear, and ** bypasses keyword checks entirely.

  2. Add the exact package version to a tty-clock keyword file in a text editor as root.

    Accepting a testing keyword lets a version that has not been marked stable for your architecture into the merge plan. The exact version limits the change to that one release.

    # nano /etc/portage/package.accept_keywords/tty-clock
    =app-misc/tty-clock-2.3 ~arm64

    On amd64, the line ends in ~amd64. If package.accept_keywords is a regular file, the line belongs at the end of that file instead. If the path is missing, this command creates the directory.

    # mkdir -p /etc/portage/package.accept_keywords

    The filename is only for organization. An unversioned entry such as app-misc/tty-clock ~arm64 also accepts future testing versions, and removing the line undoes the exception.

  3. Verify that Portage can resolve the target version without the keyword mask.
    $ emerge --pretend --verbose '=app-misc/tty-clock-2.3'
    These are the packages that would be merged, in order:
     
    Calculating dependencies ... done!
    Dependency resolution took 1.69 s (backtrack: 0/20).
     
    [ebuild  N    ~] app-misc/tty-clock-2.3::gentoo  8 KiB
     
    Total: 1 package (1 new), Size of downloads: 8 KiB
    ##### snipped #####

    The requested version now appears in the merge plan rather than as masked by: ~arm64 keyword. A pretend run does not install anything.
    Related: How to install a package on Gentoo with emerge

    If Portage reports another mask for the package or a dependency, read its reason before adding anything. A broader keyword exception does not clear a license restriction, hard mask, or blocker.

Share this guide