From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3339D158094 for ; Sun, 25 Sep 2022 18:24:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A56A62BC06E; Sun, 25 Sep 2022 18:23:26 +0000 (UTC) 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 pigeon.gentoo.org (Postfix) with ESMTPS id 6ABB12BC06B for ; Sun, 25 Sep 2022 18:23:26 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 03/15] unpacker.eclass: Fix unpack_7z to respect the exit status Date: Sun, 25 Sep 2022 20:23:05 +0200 Message-Id: <20220925182317.1559529-4-mgorny@gentoo.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220925182317.1559529-1-mgorny@gentoo.org> References: <20220925182317.1559529-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 09bd6931-dfe9-466a-94a6-f481b39f25a4 X-Archives-Hash: df38048f6938ac02a9d16569deb3b51a Signed-off-by: Michał Górny --- eclass/unpacker.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index c26523a419df..1f2f09e33ad6 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -344,8 +344,11 @@ unpack_7z() { local p7z=$(find_unpackable_file "$1") unpack_banner "${p7z}" - local output="$(7z x -y "${p7z}")" + # warning: putting local and command substitution in a single call + # discards the exit status! + local output + output="$(7z x -y "${p7z}")" if [ $? -ne 0 ]; then echo "${output}" >&2 die "unpacking ${p7z} failed (arch=unpack_7z)" -- 2.37.3