From: Bertrand Jacquin <bertr...@jacquin.bzh>

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 <bertr...@jacquin.bzh>
---
 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..36a3bb8 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} ]] ; 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}" \) \

Reply via email to