commit:     21c5d50a8e19be846e286ed06136822f89f4c4c2
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=21c5d50a

bin: ecompress: zstd: add .zst to internal compression collision check

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS          | 3 +++
 bin/ecompress | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 67cb6a795..dced9688a 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,9 @@ Bug fixes:
 
 * data: Fix PORTAGE_USERNAME default (bug #873088).
 
+* bin: ecompress: zstd: Recognize .zst as a compressed file suffix for the 
purposes
+  of the internal compressed file collision check.
+
 portage-3.0.37 (2022-09-23)
 --------------
 

diff --git a/bin/ecompress b/bin/ecompress
index a77bb7e35..7fb2b9c00 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -71,9 +71,9 @@ while [[ $# -gt 0 ]] ; do
                                # note: to save time, we need to do this only 
if there's
                                # at least one compressed file
                                case ${path} in
-                                       *.Z|*.gz|*.bz2|*.lzma|*.xz)
+                                       *.Z|*.gz|*.bz2|*.lzma|*.xz|*.zst)
                                                vpath=${path%.*}
-                                               for comp in '' .Z .gz .bz2 
.lzma .xz; do
+                                               for comp in '' .Z .gz .bz2 
.lzma .xz .zst; do
                                                        if [[ ${vpath}${comp} 
!= ${path} && \
                                                                        -e 
${vpath}${comp} ]]; then
                                                                
collisions[${path}]=1

Reply via email to