summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2024-06-19 22:03:33 -0400
committerMike Gilbert <floppym@gentoo.org>2024-06-19 22:03:33 -0400
commit7e4aeaf563a8d9b6997d872e9ce513e01b7ee022 (patch)
treedac16954759cf919bf25cbe782e42ff2e8590969 /sys-fs
parentdev-python/btrfsutil: add github upstream metadata (diff)
downloadgentoo-7e4aeaf563a8d9b6997d872e9ce513e01b7ee022.tar.gz
gentoo-7e4aeaf563a8d9b6997d872e9ce513e01b7ee022.tar.bz2
gentoo-7e4aeaf563a8d9b6997d872e9ce513e01b7ee022.zip
sys-fs/btrfs-progs: optimize src_unpack
We can avoid using a temp file via bash command substitution. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-6.9.ebuild34
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-9999.ebuild34
2 files changed, 22 insertions, 46 deletions
diff --git a/sys-fs/btrfs-progs/btrfs-progs-6.9.ebuild b/sys-fs/btrfs-progs/btrfs-progs-6.9.ebuild
index 59e32bcafd5d..a3192a87f3a1 100644
--- a/sys-fs/btrfs-progs/btrfs-progs-6.9.ebuild
+++ b/sys-fs/btrfs-progs/btrfs-progs-6.9.ebuild
@@ -94,29 +94,17 @@ pkg_setup() {
: # Prevent python-any-r1_python_setup
}
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- return
- fi
-
- if in_iuse verify-sig && 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.
- cp "${DISTDIR}"/${MY_P}.tar.xz . || die
- xz -d ${MY_P}.tar.xz || 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
-}
+if [[ ${PV} != 9999 ]]; then
+ src_unpack() {
+ if use verify-sig ; then
+ # Upstream sign the decompressed .tar
+ verify-sig_verify_detached \
+ <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz) \
+ "${DISTDIR}"/${MY_P}.tar.sign
+ fi
+ default
+ }
+fi
src_prepare() {
default
diff --git a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
index 59e32bcafd5d..a3192a87f3a1 100644
--- a/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
+++ b/sys-fs/btrfs-progs/btrfs-progs-9999.ebuild
@@ -94,29 +94,17 @@ pkg_setup() {
: # Prevent python-any-r1_python_setup
}
-src_unpack() {
- if [[ ${PV} == 9999 ]] ; then
- git-r3_src_unpack
- return
- fi
-
- if in_iuse verify-sig && 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.
- cp "${DISTDIR}"/${MY_P}.tar.xz . || die
- xz -d ${MY_P}.tar.xz || 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
-}
+if [[ ${PV} != 9999 ]]; then
+ src_unpack() {
+ if use verify-sig ; then
+ # Upstream sign the decompressed .tar
+ verify-sig_verify_detached \
+ <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz) \
+ "${DISTDIR}"/${MY_P}.tar.sign
+ fi
+ default
+ }
+fi
src_prepare() {
default