I'm trying to use INSTALL_MASK="*.h *.la *.a *.pc" to filter out files when I install packages from an http repository. It doesn't work. Please see URL for all information such as make.conf, emerge --info, output, etc. Reproducible: Always Steps to Reproduce: 1.steps to reproduce are outlined in the URL 2. 3. Actual Results: .h, .a, and .la files in question exist after installation Expected Results: .h, .a, and .la files should not be installed I can use qmerge for now and it will strip the packages appropriately, but qmerge doesn't handle dependency resolution nearly as well as emerge does. So right now i'm stuck first running emerge -pv, processing the output, and then running qmerge on each individual package. This might be considered a duplicate of bug number 81025, but I don't have sufficient privileges to reopen the bug http://bugs.gentoo.org/show_bug.cgi?id=81025
This is not a dupe of that other bug. This is a newly introduced regression. I'm able to reproduce it also using sys-apps/portage-2.1.4.4 cd /dev/shm/ ROOT=$PWD/ INSTALL_MASK="bb" emerge -Kq busybox
*** Bug 219287 has been marked as a duplicate of this bug. ***
INSTALL_MASK has no effect if it's defined in /etc/make.conf, but if it's exported as an environment variable it works without a problem.
(In reply to comment #3) > INSTALL_MASK has no effect if it's defined in /etc/make.conf, but if it's > exported as an environment variable it works without a problem. > Sorry, that's incorrect. There are still installed .h files when I emerge to a completely blank filesystem.
Created attachment 151887 [details, diff] fix environment handling for INSTALL_MASK
(In reply to comment #5) > Created an attachment (id=151887) [edit] > fix environment handling for INSTALL_MASK > # cd /dev/shm # ROOT=${PWD} INSTALL_MASK="*.h" emerge -Kv --nodeps zlib ... # find . -name '*.h' # Excellent! Thanks a lot Zac - I was attempting to dig through the portage source code to try and fix this myself, but I really couldn't find where to begin. Oddly though, using INSTALL_MASK="bb" still doesn't strip out /bin/bb if I follow Ned's test below. Things like *.h, *.la, /usr/share, etc, work fine though. Do you think that this will find its way (back) into the main portage source? Should I mark the bug as fixed or wait until it's back in portage?
(In reply to comment #6) > Oddly though, using INSTALL_MASK="bb" still doesn't strip out /bin/bb if I > follow Ned's test below. Things like *.h, *.la, /usr/share, etc, work fine > though. If you set INSTALL_MASK="*/bb" that will cause the find command in bin/misc-functions.sh to match it: set -o noglob for no_inst in ${install_mask}; do set +o noglob quiet_mode || einfo "Removing ${no_inst}" # normal stuff rm -Rf "${root}"/${no_inst} >&/dev/null # we also need to handle globs (*.a, *.h, etc) find "${root}" -path "${no_inst}" -exec rm -fR {} \; >/dev/null done > Do you think that this will find its way (back) into the main portage source? > Should I mark the bug as fixed or wait until it's back in portage? I'll mark it fixed pretty soon when portage-2.1.5_rc7 is released with the patch.
(In reply to comment #7) > (In reply to comment #6) > > Oddly though, using INSTALL_MASK="bb" still doesn't strip out /bin/bb if I > > follow Ned's test below. Things like *.h, *.la, /usr/share, etc, work fine > > though. > > If you set INSTALL_MASK="*/bb" that will cause the find command in > bin/misc-functions.sh to match it: That is a change in behavior. Is it unavoidable? find "${root}" -path "${no_inst}" -exec rm -fR {} \; >/dev/null Would -o -name "{$no_inst}" also do the trick? The old syntax worked as such "/bin/{busybox,bb,foo} *.a /path/to/file base_name_file"
this blocks emul-linux-x86-* building.
Created attachment 152019 [details, diff] fix INSTALL_MASK (In reply to comment #8) > find "${root}" -path "${no_inst}" -exec rm -fR {} \; >/dev/null > Would -o -name "{$no_inst}" also do the trick? That's included in this new patch. (In reply to comment #9) > this blocks emul-linux-x86-* building. You can apply this patch to portage if you want. It's going to be released in portage-2.1.5_rc7 later today.
(In reply to comment #10) > Created an attachment (id=152019) [edit] > fix INSTALL_MASK > > (In reply to comment #8) > > find "${root}" -path "${no_inst}" -exec rm -fR {} \; >/dev/null > > Would -o -name "{$no_inst}" also do the trick? > > That's included in this new patch. > > (In reply to comment #9) > > this blocks emul-linux-x86-* building. > > You can apply this patch to portage if you want. It's going to be released in > portage-2.1.5_rc7 later today. > I just tried this patch and it doesn't work. It seems that -name /usr/share/doc is not cut out. Apparently -name only works for files and not directories. I think that the previous patch worked, so I might go back to using that.
(In reply to comment #11) > I just tried this patch and it doesn't work. It seems that -name /usr/share/doc > is not cut out. Apparently -name only works for files and not directories. I don't see how this is a problem because /usr/share/doc should be removed by the rm -Rf "${root}"/${no_inst} part.
This patch is included in 2.1.5_rc7. Please reopen if there are any more problems.