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 77C4D1581EE for ; Mon, 24 Mar 2025 06:53:49 +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 5F0A53434E6 for ; Mon, 24 Mar 2025 06:53:49 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 95E8F1104AD; Mon, 24 Mar 2025 06:53:45 +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 8B8961104AD for ; Mon, 24 Mar 2025 06:53: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 393583434E0 for ; Mon, 24 Mar 2025 06:53:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7A4F12035 for ; Mon, 24 Mar 2025 06:53: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: <1742799176.0dbde702f43e075d88332b42c93287b200028691.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/unpacker.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0dbde702f43e075d88332b42c93287b200028691 X-VCS-Branch: master Date: Mon, 24 Mar 2025 06:53: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: a0c33218-7507-4413-ac73-5e30df4cab93 X-Archives-Hash: 6ec111cb4dd1afa119d55ecc35390c44 commit: 0dbde702f43e075d88332b42c93287b200028691 Author: NRK disroot org> AuthorDate: Fri Mar 14 17:25:16 2025 +0000 Commit: Sam James gentoo org> CommitDate: Mon Mar 24 06:52:56 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dbde702 unpacker.eclass: add support for app-arch/7zip Signed-off-by: NRK disroot.org> Signed-off-by: Sam James gentoo.org> eclass/unpacker.eclass | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index 91520a36d16a..2697b8d9d73e 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -375,10 +375,15 @@ unpack_7z() { local p7z=$(find_unpackable_file "$1") unpack_banner "${p7z}" + local cmd7z="7z" + if command -v 7zz 1>/dev/null 2>&1; then + cmd7z="7zz" + fi + # warning: putting local and command substitution in a single call # discards the exit status! local output - output="$(7z x -y "${p7z}")" + output="$($cmd7z x -y "${p7z}")" if [ $? -ne 0 ]; then echo "${output}" >&2 die "unpacking ${p7z} failed (arch=unpack_7z)" @@ -610,7 +615,13 @@ unpacker_src_uri_depends() { *.rar) deps[rar]="app-arch/unrar" ;; *.7z) - deps[7z]="app-arch/p7zip" ;; + deps[7z]=" + || ( + app-arch/7zip + app-arch/p7zip + ) + " + ;; *.xz) deps[xz]="app-arch/xz-utils" ;; *.zip)