commit: 5a1b870fe54ac06f864a648c3ea5cc118f6ce911
Author: Bertrand Jacquin <bertrand <AT> jacquin <DOT> bzh>
AuthorDate: Mon Apr 20 19:45:59 2015 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Apr 20 23:31:34 2015 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5a1b870f
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 <AT> jacquin.bzh>
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>
bin/misc-functions.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index e08c228..b5b7510 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}" \) \