summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-09-25 08:34:49 +0200
committerMichał Górny <mgorny@gentoo.org>2022-09-27 22:28:05 +0200
commit0b8998cec667d4e0fb126477ab02394d78b3fcc3 (patch)
tree6374feaa48f67e97f5c670ee0341bdd38bec9637 /eclass/unpacker.eclass
parentunpacker.eclass: decompress xz in parallel (diff)
downloadgentoo-0b8998cec667d4e0fb126477ab02394d78b3fcc3.tar.gz
gentoo-0b8998cec667d4e0fb126477ab02394d78b3fcc3.tar.bz2
gentoo-0b8998cec667d4e0fb126477ab02394d78b3fcc3.zip
unpacker.eclass: Support lbzip2 as parallel bz2 decompressor
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/unpacker.eclass')
-rw-r--r--eclass/unpacker.eclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
index d96b56609869..370f00a83bba 100644
--- a/eclass/unpacker.eclass
+++ b/eclass/unpacker.eclass
@@ -30,7 +30,8 @@ inherit multiprocessing toolchain-funcs
# @DEFAULT_UNSET
# @DESCRIPTION:
# Utility to use to decompress bzip2 files. Will dynamically pick between
-# `pbzip2` and `bzip2`. Make sure your choice accepts the "-dc" options.
+# `lbzip2`, `pbzip2` and `bzip2`. Make sure your choice accepts the "-dc"
+# options.
# Note: this is meant for users to set, not ebuilds.
# @ECLASS_VARIABLE: UNPACKER_LZIP
@@ -387,7 +388,9 @@ unpack_lha() {
_unpacker_get_decompressor() {
case ${1} in
*.bz2|*.tbz|*.tbz2)
- local bzcmd=${PORTAGE_BZIP2_COMMAND:-$(type -P pbzip2 || type -P bzip2)}
+ local bzcmd=${PORTAGE_BZIP2_COMMAND:-$(
+ type -P lbzip2 || type -P pbzip2 || type -P bzip2
+ )}
local bzuncmd=${PORTAGE_BUNZIP2_COMMAND:-${bzcmd} -d}
: ${UNPACKER_BZ2:=${bzuncmd}}
echo "${UNPACKER_BZ2} -c"