commit: 9ae3ec1af0071354db3bf57bc5cdec963b056e77
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 06:37:19 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 20:45:39 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9ae3ec1a
bin: ecompress: xz: set -9, pass -j from MAKEOPTS for parallel compression
- Pass -9 like we do for bzip2 & gzip.
- Pass -j from MAKEOPTS for parallel compression.
Signed-off-by: Sam James <sam <AT> gentoo.org>
NEWS | 5 +++++
bin/ecompress | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 8586e35cd..8ed871e5d 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,11 @@ Features:
checking for dependencies. Update @goland-rebuild accordingly which now
includes all packages depending on dev-lang/go (bug #827974, bug #865115)
+* bin: ecompress: xz: Pass -9 to xz for compression level like we do for bzip2
& gzip.
+
+* bin: ecompress: xz: Pass -T N where N is the number of jobs from ${MAKEOPTS}
+ to xz for parallel compression.
+
Bug fixes:
* emerge: Scheduler: Fix filenames for binpkgs in some cases - reuse existing
filename and don't allocate a new one (bug #872392).
diff --git a/bin/ecompress b/bin/ecompress
index c69e8d6dd..57c518705 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -128,6 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
# See: https://bugs.gentoo.org/672916
# Setting '--rm' will remove the source files after a
successful compression.
lz4) PORTAGE_COMPRESS_FLAGS="-m --rm";;
+ xz) PORTAGE_COMPRESS_FLAGS="-9 -T$(__makeopts_jobs)";;
esac
fi