From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C70781580EB for ; Fri, 30 May 2025 07:30:53 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 8F5DE343103 for ; Fri, 30 May 2025 07:30:53 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 8EB1C110497; Fri, 30 May 2025 07:30:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 87DA8110497 for ; Fri, 30 May 2025 07:30:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2509A3430A6 for ; Fri, 30 May 2025 07:30:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B83528E3 for ; Fri, 30 May 2025 07:30:43 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1748590234.3aa3a908d1034ca3151b7873b7a8f8114005c9c4.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/estrip X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 3aa3a908d1034ca3151b7873b7a8f8114005c9c4 X-VCS-Branch: master Date: Fri, 30 May 2025 07:30:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 579359dd-14ba-4695-894a-b21e46a532db X-Archives-Hash: 9762924475fbf1ca39097500c1a80d05 commit: 3aa3a908d1034ca3151b7873b7a8f8114005c9c4 Author: Kerin Millar plushkava net> AuthorDate: Sun Aug 7 17:56:05 2022 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 30 07:30:34 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3aa3a908 estrip: eliminate a defective echo/comsub/globbing trifecta Clearly, $(shopt -s nullglob; echo *) was intended as a method of 'scoping' the nullglob option. It is a dreadful approach, exhibiting at least three potential defects in addition to being memory-inefficient. Instead, iterate over the glob directly with for. Given that estrip is an executable, setting nullglob would likely have been fine. Still, rather than fret over whether nullglob might subsequently need to be toggled off, let's obivate the need for it by using test -e for now. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/estrip | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/estrip b/bin/estrip index 640645be63..592aee24f7 100755 --- a/bin/estrip +++ b/bin/estrip @@ -511,7 +511,8 @@ done < <(find "${ED}" -name '*.estrip' -delete -print0) fi # Now we look for unstripped binaries. -for inode_link in $(shopt -s nullglob; echo *) ; do +for inode_link in *; do +test -e "${inode_link}" || continue while read -r x do