Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 27 Sep 2022 20:29:00
Message-Id: 1664310485.0b8998cec667d4e0fb126477ab02394d78b3fcc3.mgorny@gentoo
1 commit: 0b8998cec667d4e0fb126477ab02394d78b3fcc3
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 25 06:34:49 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 27 20:28:05 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b8998ce
7
8 unpacker.eclass: Support lbzip2 as parallel bz2 decompressor
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 eclass/unpacker.eclass | 7 +++++--
13 1 file changed, 5 insertions(+), 2 deletions(-)
14
15 diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
16 index d96b56609869..370f00a83bba 100644
17 --- a/eclass/unpacker.eclass
18 +++ b/eclass/unpacker.eclass
19 @@ -30,7 +30,8 @@ inherit multiprocessing toolchain-funcs
20 # @DEFAULT_UNSET
21 # @DESCRIPTION:
22 # Utility to use to decompress bzip2 files. Will dynamically pick between
23 -# `pbzip2` and `bzip2`. Make sure your choice accepts the "-dc" options.
24 +# `lbzip2`, `pbzip2` and `bzip2`. Make sure your choice accepts the "-dc"
25 +# options.
26 # Note: this is meant for users to set, not ebuilds.
27
28 # @ECLASS_VARIABLE: UNPACKER_LZIP
29 @@ -387,7 +388,9 @@ unpack_lha() {
30 _unpacker_get_decompressor() {
31 case ${1} in
32 *.bz2|*.tbz|*.tbz2)
33 - local bzcmd=${PORTAGE_BZIP2_COMMAND:-$(type -P pbzip2 || type -P bzip2)}
34 + local bzcmd=${PORTAGE_BZIP2_COMMAND:-$(
35 + type -P lbzip2 || type -P pbzip2 || type -P bzip2
36 + )}
37 local bzuncmd=${PORTAGE_BUNZIP2_COMMAND:-${bzcmd} -d}
38 : ${UNPACKER_BZ2:=${bzuncmd}}
39 echo "${UNPACKER_BZ2} -c"