commit: 234df66081176a5703de311fccc439ca30f413ae
parent 75b2e3941a5caa67490d2b4c436d9b2dbb2e3ff7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 6 Dec 2024 03:29:54 +0100
sys-apps/portage: use libarchive bsdtar for zip|jar|7z|rar
Diffstat:
1 file changed, 49 insertions(+), 0 deletions(-)
diff --git a/patches/sys-apps/portage/0001-bin-phase-helpers.sh-use-libarchive-bsdtar-for-zip-j.patch b/patches/sys-apps/portage/0001-bin-phase-helpers.sh-use-libarchive-bsdtar-for-zip-j.patch
@@ -0,0 +1,49 @@
+From 7f2d1eaba89e98e6932f1ca676e1251e572d6a3a Mon Sep 17 00:00:00 2001
+From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
+Date: Fri, 6 Dec 2024 03:26:13 +0100
+Subject: [PATCH] bin/phase-helpers.sh: use libarchive bsdtar for
+ zip|jar|7z|rar
+
+---
+ bin/phase-helpers.sh | 18 ++----------------
+ 1 file changed, 2 insertions(+), 16 deletions(-)
+
+diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
+index 5a35130..547b10b 100644
+--- a/bin/phase-helpers.sh
++++ b/bin/phase-helpers.sh
+@@ -408,11 +408,8 @@ __unpack_tar()
+ ${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d} -c -- "${srcdir}${x}" | tar xof -
+ __assert_sigpipe_ok "${myfail}"
+ ;;
+- zip|jar)
+- # unzip will interactively prompt under some error conditions,
+- # as reported in bug #336285
+- ( set +x ; while true ; do echo n || break ; done ) | \
+- unzip -qo "${srcdir}${x}" || die "${myfail}"
++ zip|jar|7z|rar)
++ bsdtar xof "${srcdir}${x}" || die "${myfail}"
+ ;;
+ gz|z)
+ __unpack_tar "gzip -d"
+@@ -420,17 +417,6 @@ __unpack_tar()
+ bz2|bz)
+ __unpack_tar "${PORTAGE_BUNZIP2_COMMAND:-${PORTAGE_BZIP2_COMMAND} -d}"
+ ;;
+- 7z)
+- local my_output
+- my_output="$(7z x -y "${srcdir}${x}")"
+- if [[ $? -ne 0 ]]; then
+- echo "${my_output}" >&2
+- die "${myfail}"
+- fi
+- ;;
+- rar)
+- unrar x -idq -o+ "${srcdir}${x}" || die "${myfail}"
+- ;;
+ lha|lzh)
+ lha xfq "${srcdir}${x}" || die "${myfail}"
+ ;;
+--
+2.45.2
+