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 409FA1580EB for ; Fri, 30 May 2025 08:14:52 +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 AB4CC3430E4 for ; Fri, 30 May 2025 08:14:51 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id A144B1104B0; Fri, 30 May 2025 08:14:36 +0000 (UTC) Received: from smtp.gentoo.org (mail.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)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 9716D1104AE for ; Fri, 30 May 2025 08:14:36 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 50AF734309F for ; Fri, 30 May 2025 08:14:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E087028F3 for ; Fri, 30 May 2025 08:14:33 +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: <1748592861.3796ccdf04122cbd1a03e023dff2a4a684e42bc6.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: 3796ccdf04122cbd1a03e023dff2a4a684e42bc6 X-VCS-Branch: master Date: Fri, 30 May 2025 08:14:33 +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: fbfa6e5b-2c49-43b3-839b-716671ba8004 X-Archives-Hash: 7146c91c247c530d1fccea12f1210dc9 commit: 3796ccdf04122cbd1a03e023dff2a4a684e42bc6 Author: Kerin Millar plushkava net> AuthorDate: Sat Jul 27 20:22:30 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 30 08:14:21 2025 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3796ccdf phase-helpers.sh: check the exit status of 7z directly There's no need to check $? specifically. While at it, use printf instead of echo. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> bin/phase-helpers.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 3378d8971a..128c00a227 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -426,9 +426,8 @@ unpack() { ;; 7z) local my_output - my_output="$(7z x -y "${srcdir}${f}")" - if [[ $? -ne 0 ]]; then - echo "${my_output}" >&2 + if ! my_output=$(7z x -y "${srcdir}${f}"); then + printf '%s\n' "${my_output}" >&2 die "${myfail}" fi ;;