summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-24 23:43:33 +0100
committerMichał Górny <mgorny@gentoo.org>2022-09-27 22:28:04 +0200
commit8a3d437b424335cc615674cd2cabdb17c7941e10 (patch)
treedb3d09645c5c2db728668176a880fdf4d35797ba /eclass/unpacker.eclass
parentunpacker.eclass: Add on-the-fly .gpkg.tar unpacking support (diff)
downloadgentoo-8a3d437b424335cc615674cd2cabdb17c7941e10.tar.gz
gentoo-8a3d437b424335cc615674cd2cabdb17c7941e10.tar.bz2
gentoo-8a3d437b424335cc615674cd2cabdb17c7941e10.zip
unpacker.eclass: decompress xz in parallel
>= xz 5.3.3_alpha supports parallel decompression, so let's use it. As recently added to Portage (see https://github.com/gentoo/portage/commit/48d107e5c1a103d59a053aebeefa9a5aac5c32ff). Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/unpacker.eclass')
-rw-r--r--eclass/unpacker.eclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index 70a46ac19709..d96b56609869 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -23,7 +23,7 @@ esac
if [[ -z ${_UNPACKER_ECLASS} ]]; then
_UNPACKER_ECLASS=1
-inherit toolchain-funcs
+inherit multiprocessing toolchain-funcs
# @ECLASS_VARIABLE: UNPACKER_BZ2
# @USER_VARIABLE
@@ -395,7 +395,7 @@ _unpacker_get_decompressor() {
*.z|*.gz|*.tgz)
echo "gzip -dc" ;;
*.lzma|*.xz|*.txz)
- echo "xz -dc" ;;
+ echo "xz -T$(makeopts_jobs) -dc" ;;
*.lz)
: ${UNPACKER_LZIP:=$(type -P plzip || type -P pdlzip || type -P lzip)}
echo "${UNPACKER_LZIP} -dc" ;;