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:28:58
Message-Id: 1664310484.8a3d437b424335cc615674cd2cabdb17c7941e10.mgorny@gentoo
1 commit: 8a3d437b424335cc615674cd2cabdb17c7941e10
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 24 22:43:33 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 27 20:28:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a3d437b
7
8 unpacker.eclass: decompress xz in parallel
9
10 >= xz 5.3.3_alpha supports parallel decompression, so let's use it.
11
12 As recently added to Portage (see
13 https://github.com/gentoo/portage/commit/48d107e5c1a103d59a053aebeefa9a5aac5c32ff).
14
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
17
18 eclass/unpacker.eclass | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
22 index 70a46ac19709..d96b56609869 100644
23 --- a/eclass/unpacker.eclass
24 +++ b/eclass/unpacker.eclass
25 @@ -23,7 +23,7 @@ esac
26 if [[ -z ${_UNPACKER_ECLASS} ]]; then
27 _UNPACKER_ECLASS=1
28
29 -inherit toolchain-funcs
30 +inherit multiprocessing toolchain-funcs
31
32 # @ECLASS_VARIABLE: UNPACKER_BZ2
33 # @USER_VARIABLE
34 @@ -395,7 +395,7 @@ _unpacker_get_decompressor() {
35 *.z|*.gz|*.tgz)
36 echo "gzip -dc" ;;
37 *.lzma|*.xz|*.txz)
38 - echo "xz -dc" ;;
39 + echo "xz -T$(makeopts_jobs) -dc" ;;
40 *.lz)
41 : ${UNPACKER_LZIP:=$(type -P plzip || type -P pdlzip || type -P lzip)}
42 echo "${UNPACKER_LZIP} -dc" ;;