Summary: | INSTALL_MASK setting | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Brian Jackson (RETIRED) <iggy> |
Component: | Enhancement/Feature Requests | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mutex, solar |
Priority: | High | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
portage-install-mask.patch
portage-install-mask.patch.2 |
Description
Brian Jackson (RETIRED)
2004-10-11 20:50:57 UTC
Using INSTALL_MASK="*.a *.h /usr/include /usr/lib/*.o " would sure make my life eaiser. I hope this one gets merged before .51 final. Created attachment 41991 [details, diff]
portage-install-mask.patch
solar and I were talking, and thought an additional line might be useful, and would give all the expected behavior that most people would want out of this feature: rm -rf "${IMAGE}/${no_inst}" Not sure if I like mixing dir names w/ find patterns.. potentially two vars? new patch that fixes the INSTALL_MASK="/usr/lib/*.o" case --- /usr/lib/portage/bin/ebuild.sh.orig 2004-11-03 16:46:55 +0000 +++ /usr/lib/portage/bin/ebuild.sh 2004-10-28 18:15:57 +0000 @@ -1005,6 +1005,23 @@ pkg_preinst + # hopefully this will someday allow us to get rid of the no* feature flags + # we don't want globbing for initial expansion, but afterwards, we do + local shopts=$- + set -o noglob + for no_inst in `echo "${INSTALL_MASK}"` ; do + set +o noglob + einfo "Removing ${no_inst}" + # normal stuff + rm -Rf ${IMAGE}/${no_inst} >&/dev/null + + # we also need to handle globs (*.a, *.h, etc) + find "${IMAGE}" -name ${no_inst} -exec rm -fR {} \; >&/dev/null + done + # set everything back the way we found it + set +o noglob + set -${shopts} + # remove man pages if hasq noman $FEATURES; then rm -fR "${IMAGE}/usr/share/man" Created attachment 43226 [details, diff]
portage-install-mask.patch.2
updated patch that handles /usr/lib/*.o correctly
Iggy: Tested with patch2. It's working good and this revision is much cleaner I like it. Brian Harring I don't get the dirname with filenames part. What concerns you? Only thing that concerns me at all is if something like this were to ever happen INSTALL_MASK="../../../../../../../*" which could get turned into ${IMAGE}/../../.. -> $ROOT Perhaps using -xdev with the find command would be ideal? In head now. Added to portage_2_0 =sys-apps/portage-2.0.51-r10 includes INSTALL_MASK support Hello. Since I caqnot read skripts that well. Can you give a short description for what INSTALL_MASK Can be used? - I mean it is a "not documented feature" whch could be useful to others. (If I am overlooked the place of the doc pleas point me there.) thx a lot. It's intentionally not documented. When we feel it's ready for general consumption, we will document it in the proper place. Went in a while back |