commit: 4c7ff1532177ca08d42c1866bb299a15d225c4ec
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Jun 9 09:41:18 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 11 03:26:16 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4c7ff153
ecompress: fall back to bzip2 in a neater way
Use the ${param=word} form of expansion to assign to the
'PORTAGE_COMPRESS' variable in the case that it is unset.
Also, replace a useless comment with two comments that are not.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/ecompress | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/ecompress b/bin/ecompress
index 2dc663bf44..fddcb9254b 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -214,9 +214,9 @@ while (( $# )); do
esac
done
-# setup compression stuff
-PORTAGE_COMPRESS=${PORTAGE_COMPRESS-bzip2}
-if [[ -z ${PORTAGE_COMPRESS} ]]; then
+# Default to bzip2 if unset.
+if [[ ! ${PORTAGE_COMPRESS=bzip2} ]]; then
+ # It was set as the null string. Take it that no compression is desired.
printf '%s\0' "${ED}" | find0 -name '*.ecompress' ! -path $'*\n*'
-delete
exit 0
fi