emerge seems to mishandle comments in package.mask when printing package.mask context. In my case, it prints only 3 irrelevant comments found in middle of the file instead of the actual package entry found at the end. # emerge -1v pandoc These are the packages that would be merged, in order: Calculating dependencies... done! !!! All ebuilds that could satisfy ">=dev-haskell/syb-0.1:=[profile?]" have been masked. !!! One of the following masked packages is required to complete your request: - dev-haskell/syb-0.7.1::gentoo (masked by: package.mask) /etc/portage/package.mask/local.conf: #=x11-base/xorg-server-1.20.0 #dev-python/pytest-cov #=media-libs/mesa-19.1.0_rc2 (dependency required by "app-text/pandoc-2.9.2.1::gentoo" [ebuild]) (dependency required by "pandoc" [argument]) For more information, see the MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook.