summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-06-20 11:26:06 +0100
committerSam James <sam@gentoo.org>2024-06-20 11:26:06 +0100
commit642e5d4d082fd1ea2546d701cedc05dffb67cc41 (patch)
treedd97f29b36b8106f23b4644bf2edd01b8d81d6b0 /dev-util
parentdev-python/cftime: Stabilize 1.6.3 x86, #933799 (diff)
downloadgentoo-642e5d4d082fd1ea2546d701cedc05dffb67cc41.tar.gz
gentoo-642e5d4d082fd1ea2546d701cedc05dffb67cc41.tar.bz2
gentoo-642e5d4d082fd1ea2546d701cedc05dffb67cc41.zip
dev-util/pahole: optimize src_unpack
As just done in util-linux & btrfs-progs. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/pahole/pahole-1.26-r1.ebuild22
-rw-r--r--dev-util/pahole/pahole-9999.ebuild22
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() {