From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1644987-garchives=archives.gentoo.org@lists.gentoo.org>
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 1301515817D
	for <garchives@archives.gentoo.org>; Thu, 20 Jun 2024 10:31:42 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 55F5EE2A2A;
	Thu, 20 Jun 2024 10:31:41 +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) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 311C2E2A28
	for <gentoo-commits@lists.gentoo.org>; Thu, 20 Jun 2024 10:31:41 +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 2F5AD335DC5
	for <gentoo-commits@lists.gentoo.org>; Thu, 20 Jun 2024 10:31:40 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 936761D17
	for <gentoo-commits@lists.gentoo.org>; Thu, 20 Jun 2024 10:31:38 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
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" <sam@gentoo.org>
Message-ID: <1718879166.642e5d4d082fd1ea2546d701cedc05dffb67cc41.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/pahole/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/pahole/pahole-1.26-r1.ebuild dev-util/pahole/pahole-9999.ebuild
X-VCS-Directories: dev-util/pahole/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 642e5d4d082fd1ea2546d701cedc05dffb67cc41
X-VCS-Branch: master
Date: Thu, 20 Jun 2024 10:31:38 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: b73f20c8-019b-467d-94de-ddffda5bfc21
X-Archives-Hash: 1df74cd2a56739af3c69db65b7a3c8ed

commit:     642e5d4d082fd1ea2546d701cedc05dffb67cc41
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 20 10:26:06 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 20 10:26:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=642e5d4d

dev-util/pahole: optimize src_unpack

As just done in util-linux & btrfs-progs.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/pahole/pahole-1.26-r1.ebuild | 22 +++++++++-------------
 dev-util/pahole/pahole-9999.ebuild    | 22 +++++++++-------------
 2 files changed, 18 insertions(+), 26 deletions(-)

diff --git a/dev-util/pahole/pahole-1.26-r1.ebuild b/dev-util/pahole/pahole-1.26-r1.ebuild
index e9c3238b4568..8fd7c7683406 100644
--- a/dev-util/pahole/pahole-1.26-r1.ebuild
+++ b/dev-util/pahole/pahole-1.26-r1.ebuild
@@ -52,21 +52,17 @@ src_unpack() {
 	if [[ ${PV} == 9999 ]] ; then
 		git-r3_src_unpack
 		return
-	elif use verify-sig ; then
-		mkdir "${T}"/verify-sig || die
-		pushd "${T}"/verify-sig &>/dev/null || die
-
-		# Upstream sign the decompressed .tar
-		# Let's do it separately in ${T} then cleanup to avoid external
-		# effects on normal unpack.
-		xz -d -c "${DISTDIR}"/${MY_P}.tar.xz > ${MY_P}.tar || die
-		verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
-
-		popd &>/dev/null || die
-		rm -r "${T}"/verify-sig || die
 	fi
 
-	default
+	# Upstream sign the decompressed .tar
+	if use verify-sig; then
+		einfo "Unpacking ${MY_P}.tar.xz ..."
+		verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \
+			< <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -x))
+		assert "Unpack failed"
+	else
+		default
+	fi
 }
 
 src_prepare() {

diff --git a/dev-util/pahole/pahole-9999.ebuild b/dev-util/pahole/pahole-9999.ebuild
index e9c3238b4568..8fd7c7683406 100644
--- a/dev-util/pahole/pahole-9999.ebuild
+++ b/dev-util/pahole/pahole-9999.ebuild
@@ -52,21 +52,17 @@ src_unpack() {
 	if [[ ${PV} == 9999 ]] ; then
 		git-r3_src_unpack
 		return
-	elif use verify-sig ; then
-		mkdir "${T}"/verify-sig || die
-		pushd "${T}"/verify-sig &>/dev/null || die
-
-		# Upstream sign the decompressed .tar
-		# Let's do it separately in ${T} then cleanup to avoid external
-		# effects on normal unpack.
-		xz -d -c "${DISTDIR}"/${MY_P}.tar.xz > ${MY_P}.tar || die
-		verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign
-
-		popd &>/dev/null || die
-		rm -r "${T}"/verify-sig || die
 	fi
 
-	default
+	# Upstream sign the decompressed .tar
+	if use verify-sig; then
+		einfo "Unpacking ${MY_P}.tar.xz ..."
+		verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \
+			< <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -x))
+		assert "Unpack failed"
+	else
+		default
+	fi
 }
 
 src_prepare() {