The language of INSTALL_MASKs documentation suggests it has to be a whitespaced list of files. It doesn't cover the support it has for excluding directories full of files: > INSTALL_MASK = [space delimited list of file names] > Use this variable if you want to selectively prevent certain files from being copied into your file system tree. This does not work on sym‐ > links, but only on actual files. Useful if you wish to filter out files like HACKING.gz and TODO.gz. The INSTALL_MASK is processed just > before a package is merged. Also supported is a PKG_INSTALL_MASK variable that behaves exactly like INSTALL_MASK except that it is processed > just before creation of a binary package. That is to say, (for example) if I had gotten sick to death of the useless failures when installing sea-monkey/firefox due to file collisions in the debug/.build-id folder, I would have to ( according to how the documentation ), name each and every single file I wished to exclude, I would have to enumerate all 2^168 paths. Fortunately, it supports directories: > 15:50:22 <+kent\n> dilfridge: I'm just going to install mask that debug-id folder. Its so stupid. waiting an hour for seamonkey/firefox to compile and having it cry over useless files is just so stupid > 15:54:51 <+kent\n> "INSTALL_MASK = [space delimited list of file names] > 15:54:55 <+kent\n> .... > 15:54:57 <+kent\n> that's useless. > 15:55:52 <@bonsaikitten> kent\n: it actually takes directories > 15:56:12 <+kent\n> Then the docs are pretty bad. > 15:56:22 <@bonsaikitten> pls2bug INSTALL_MASK="/usr/lib/debug/.build-id/" ^ problem solved for me. Yay, I don't have to fill more ram than I own with an ENV key :D ( Yes, please not to be distracted by the case I am using as the example, this is simply about the inadequacy of the documentation of INSTALL_MASK in respect to directories. )
This is fixed in git: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4369d1aca89eaecd589af4aa7a387ce36e5c42e7
Fixed in 2.2.28.