From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7EC3B138CA2 for ; Mon, 20 Apr 2015 19:46:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CCB8AE0826; Mon, 20 Apr 2015 19:46:05 +0000 (UTC) Received: from toothrot.meleeweb.net (fr1.as29.net [62.210.131.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 020ADE07D5 for ; Mon, 20 Apr 2015 19:46:04 +0000 (UTC) Received: from beber by toothrot.meleeweb.net with local id 1YkHdr-00032a-Cn; Mon, 20 Apr 2015 21:46:03 +0200 From: Bertrand Jaquin To: gentoo-portage-dev@lists.gentoo.org Cc: Bertrand Jacquin Subject: [gentoo-portage-dev] [PATCHv3 2/2] MEDIUM: misc-functions: Be more verbose when removing INSTALL_MASK glob Date: Mon, 20 Apr 2015 21:46:00 +0200 Message-Id: <1429559160-11646-2-git-send-email-bertrand@jacquin.bzh> X-Mailer: git-send-email 2.0.5 In-Reply-To: <1429559160-11646-1-git-send-email-bertrand@jacquin.bzh> References: <1429559160-11646-1-git-send-email-bertrand@jacquin.bzh> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: da86e320-fd60-4a68-b760-b8749cdc97b8 X-Archives-Hash: df13ef6d122deb534b7f977af59ec69f From: Bertrand Jacquin When glob are defined in INSTALL_MASK, no output is given on what file has been deleted. The following patch provide more information to user about what is actually removed. Example: # INSTALL_MASK='*.h' emerge -va1t x11-proto/xproto .. >>> Installing (1 of 2) x11-proto/xproto-7.0.27::gentoo * Removing /usr/include/X11/DECkeysym.h * Removing /usr/include/X11/HPkeysym.h * Removing /usr/include/X11/Sunkeysym.h * Removing /usr/include/X11/X.h * Removing /usr/include/X11/XF86keysym.h * Removing /usr/include/X11/XWDFile.h * Removing /usr/include/X11/Xalloca.h * Removing /usr/include/X11/Xarch.h * Removing /usr/include/X11/Xatom.h * Removing /usr/include/X11/Xdefs.h * Removing /usr/include/X11/Xfuncproto.h * Removing /usr/include/X11/Xfuncs.h * Removing /usr/include/X11/Xmd.h * Removing /usr/include/X11/Xos.h * Removing /usr/include/X11/Xos_r.h * Removing /usr/include/X11/Xosdefs.h * Removing /usr/include/X11/Xpoll.h * Removing /usr/include/X11/Xproto.h * Removing /usr/include/X11/Xprotostr.h * Removing /usr/include/X11/Xthreads.h * Removing /usr/include/X11/Xw32defs.h * Removing /usr/include/X11/Xwindows.h * Removing /usr/include/X11/Xwinsock.h * Removing /usr/include/X11/ap_keysym.h * Removing /usr/include/X11/keysym.h * Removing /usr/include/X11/keysymdef.h * checking 1 files for package collisions >>> Merging x11-proto/xproto-7.0.27 to / Signed-off-by: Bertrand Jacquin --- bin/misc-functions.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 36a3bb8..68c0c76 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -276,7 +276,13 @@ install_mask() { # we also need to handle globs (*.a, *.h, etc) find "${root}" \( -path "${no_inst}" -or -name "${no_inst}" \) \ - -exec rm -fR {} \; >/dev/null 2>&1 + -print0 2> /dev/null \ + | LC_ALL=C sort -z \ + | while read -r -d ''; do + __quiet_mode || einfo "Removing /${REPLY#${root}}" + rm -Rf "${REPLY}" >&/dev/null + done + done # set everything back the way we found it set +o noglob