aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2015-04-20 21:45:59 +0200
committerZac Medico <zmedico@gentoo.org>2015-04-20 16:31:34 -0700
commit5a1b870fe54ac06f864a648c3ea5cc118f6ce911 (patch)
treeffd2284fd313e450e85db8107742b9b8f23af32f /bin
parentUpdate URLs in Hardened QA checks (diff)
downloadportage-5a1b870fe54ac06f864a648c3ea5cc118f6ce911.tar.gz
portage-5a1b870fe54ac06f864a648c3ea5cc118f6ce911.tar.bz2
portage-5a1b870fe54ac06f864a648c3ea5cc118f6ce911.zip
MEDIUM: misc-functions: Be more quiet when removing non existing INSTALL_MASK
When FEATURES="nodoc noinfo noman" is used, you will get the following output for every packages, even virtual that contain no file: # FEATURES="nodoc noinfo noman" emerge -va1t virtual/cron .. >>> Installing (1 of 1) virtual/cron-0::gentoo * Removing /usr/share/man * Removing /usr/share/info * Removing /usr/share/doc * checking 0 files for package collisions >>> Merging virtual/cron-0 to / The following patch makes the output as: # FEATURES="nodoc noinfo noman" emerge -va1t virtual/cron .. >>> Installing (1 of 1) virtual/cron-0::gentoo * checking 0 files for package collisions >>> Merging virtual/cron-0 to / Signed-off-by: Bertrand Jacquin <bertrand@jacquin.bzh> Acked-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/misc-functions.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index e08c228d2..b5b7510f7 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -267,9 +267,12 @@ install_mask() {
local no_inst
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
+ if [[ -e "${root}"/${no_inst} || "${root}"/${no_inst} != $(echo "${root}"/${no_inst}) ]] ; then
+ __quiet_mode || einfo "Removing ${no_inst}"
+ rm -Rf "${root}"/${no_inst} >&/dev/null
+ fi
# we also need to handle globs (*.a, *.h, etc)
find "${root}" \( -path "${no_inst}" -or -name "${no_inst}" \) \