commit:     6476763b94da150fc27a60a2e0510b8cb5089bdc
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Jun  7 12:31:05 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun  7 22:54:14 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=6476763b

ecompress: reformat a case statement, along with a comment

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/ecompress | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/bin/ecompress b/bin/ecompress
index 0cb18c73ac..ded4b4b824 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -208,13 +208,20 @@ fi
 
 if [[ ! -v PORTAGE_COMPRESS_FLAGS ]] ; then
        case ${PORTAGE_COMPRESS} in
-               bzip2|gzip)  PORTAGE_COMPRESS_FLAGS="-9";;
-               # Without setting '-m' lz4 will not compress multiple files at 
once.
-               # 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="-q -T$(___makeopts_jobs) 
--memlimit-compress=50%";;
-               zstd) PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";;
+               bzip2|gzip)
+                       PORTAGE_COMPRESS_FLAGS="-9"
+                       ;;
+               lz4)
+                       # Without the -m option, lz4 will not compress multiple
+                       # files at once, per bug 672916. Passing --rm removes
+                       # the source files upon successfuly compressing.
+                       PORTAGE_COMPRESS_FLAGS="-m --rm"
+                       ;;
+               xz)
+                       PORTAGE_COMPRESS_FLAGS="-q -T$(___makeopts_jobs) 
--memlimit-compress=50%"
+                       ;;
+               zstd)
+                       PORTAGE_COMPRESS_FLAGS="-q --rm -T$(___makeopts_jobs)";;
        esac
 fi
 

Reply via email to