public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCHv3 1/2] MEDIUM: misc-functions: Be more quiet when removing non existing INSTALL_MASK
@ 2015-04-20 19:45 Bertrand Jaquin
  2015-04-20 19:46 ` [gentoo-portage-dev] [PATCHv3 2/2] MEDIUM: misc-functions: Be more verbose when removing INSTALL_MASK glob Bertrand Jaquin
  2015-04-20 23:39 ` [gentoo-portage-dev] [PATCHv3 1/2] MEDIUM: misc-functions: Be more quiet when removing non existing INSTALL_MASK Zac Medico
  0 siblings, 2 replies; 14+ messages in thread
From: Bertrand Jaquin @ 2015-04-20 19:45 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Bertrand Jacquin

From: Bertrand Jacquin <bertrand@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 <bertrand@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}" \) \


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-04-23  1:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-20 19:45 [gentoo-portage-dev] [PATCHv3 1/2] MEDIUM: misc-functions: Be more quiet when removing non existing INSTALL_MASK Bertrand Jaquin
2015-04-20 19:46 ` [gentoo-portage-dev] [PATCHv3 2/2] MEDIUM: misc-functions: Be more verbose when removing INSTALL_MASK glob Bertrand Jaquin
2015-04-20 23:39 ` [gentoo-portage-dev] [PATCHv3 1/2] MEDIUM: misc-functions: Be more quiet when removing non existing INSTALL_MASK Zac Medico
2015-04-21  0:31   ` Bertrand Jacquin
2015-04-21  0:37     ` Zac Medico
2015-04-21  9:48       ` [gentoo-portage-dev] " Duncan
2015-04-21 11:21         ` Michael Orlitzky
2015-04-21 17:28           ` Zac Medico
2015-04-21 19:08             ` Michael Orlitzky
2015-04-21 19:20               ` Zac Medico
2015-04-21 17:27         ` Zac Medico
2015-04-21 17:30           ` Zac Medico
2015-04-22 23:44       ` [gentoo-portage-dev] " Bertrand Jacquin
2015-04-23  1:43         ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox