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 AEF7B158074 for ; Sat, 28 Jun 2025 02:30:54 +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) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 9CBF834108C for ; Sat, 28 Jun 2025 02:30:54 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 1D3A8110563; Sat, 28 Jun 2025 02:30:38 +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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 13559110561 for ; Sat, 28 Jun 2025 02:30:38 +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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B6F23340EC3 for ; Sat, 28 Jun 2025 02:30:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3D6222AA9 for ; Sat, 28 Jun 2025 02:30:35 +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: <1751077817.21bd1ccf4a4a4f84928bb24e9832e2b4ad4c8d9a.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/phase-helpers.sh X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 21bd1ccf4a4a4f84928bb24e9832e2b4ad4c8d9a X-VCS-Branch: master Date: Sat, 28 Jun 2025 02:30:35 +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: 62defe02-d6e3-47a5-8c7b-23b690b0f87d X-Archives-Hash: 992b1e5557bbf482de85442a1e8f60be commit: 21bd1ccf4a4a4f84928bb24e9832e2b4ad4c8d9a Author: Kerin Millar plushkava net> AuthorDate: Thu Jun 26 04:43:50 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jun 28 02:30:17 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=21bd1ccf phase-helpers.sh: check for GNU ar in a quieter way Presently, the unpack() function employs the combination of a conditional expression and a command substitution to test whether the implementation of ar(1) is provided by GNU. However, the captured output of ar --version will be shown in its entirety, provided that the following two conditions hold true. - the xtrace shell option is enabled - BASH_XTRACEFD is set to something other than 2 Specifically, the captured output will be written to the file descriptor that is referenced by 'BASH_XTRACEFD', which could be somewhat grating. Address this issue by instead using grep(1) to match against the output stream of ar(1). Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/phase-helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 918aaab75c..94b922d45b 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -466,7 +466,7 @@ unpack() { # `deb2targz` installed, prefer it over `ar` for that # reason. We just make sure on AIX `deb2targz` is # installed. - if { hash deb2targz && [[ $(ar --version) != "GNU ar"* ]]; } 2>/dev/null; then + if { hash deb2targz && ! ar --version | grep -q '^GNU ar'; } 2>/dev/null; then # deb2targz always extracts into the same directory as # the source file, so create a symlink in the current # working directory if necessary.