There's a patch set available here, but it unnecessarily includes INSTALL_MASKEDed files in CONTENTS (for bug 364633) which should be factored out since it's buggy (asymmetric collision-protect behavior) and introduces significant complexity which is not needed for exclusion support: https://archives.gentoo.org/gentoo-portage-dev/message/d6f4ca15a5bcd693ff6f63af0e717f5c
Patch series posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/b5fc4621c63f5f6b0d8f0a97aadb2473 https://github.com/gentoo/portage/pull/284
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=8f9cff73321b3ee5957357448819b505932e0e5c commit 8f9cff73321b3ee5957357448819b505932e0e5c Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2016-05-22 06:40:13 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2018-03-28 06:28:17 +0000 {,PKG_}INSTALL_MASK: Support exclusions (bug 651214) Allow INSTALL_MASK patterns to start with '-' to indicate that a specific match is to be excluded from being masked. In this case, the last matching pattern determines whether the file is actually filtered out or kept. Bug: https://bugs.gentoo.org/651214 pym/portage/util/install_mask.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)}
Fixed in portage-2.3.40-r1.