Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 527004

Summary: INSTALL_MASK documentation doesn't cover path support
Product: Portage Development Reporter: Kent Fredric (IRC: kent\n) (RETIRED) <kentnl>
Component: DocumentationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 573774    

Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2014-10-27 04:21:06 UTC
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. )
Comment 1 Alexander Berntsen (RETIRED) gentoo-dev 2016-02-02 20:54:38 UTC
This is fixed in git: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4369d1aca89eaecd589af4aa7a387ce36e5c42e7
Comment 2 Zac Medico gentoo-dev 2017-08-11 20:24:35 UTC
Fixed in 2.2.28.