Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: /, bin/
Date: Thu, 29 Sep 2022 20:45:53
Message-Id: 1664484340.636dd15437eccfaf63e76c36412999b5e118c209.sam@gentoo
1 commit: 636dd15437eccfaf63e76c36412999b5e118c209
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 29 20:44:31 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 29 20:45:40 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=636dd154
7
8 bin: ecompress: add .lz and .lzo for internal collision check too
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 NEWS | 3 +++
13 bin/ecompress | 4 ++--
14 2 files changed, 5 insertions(+), 2 deletions(-)
15
16 diff --git a/NEWS b/NEWS
17 index 31927c819..64095d920 100644
18 --- a/NEWS
19 +++ b/NEWS
20 @@ -38,6 +38,9 @@ Bug fixes:
21 * bin: ecompress: lz4: Recognize .lz4 as a compressed file suffix for the purposes
22 of the internal compressed file collision check.
23
24 +* bin: compress: Recognize .lzo and .lz for the internal compressed file
25 + collision check too.
26 +
27 * bin: ecompress: zstd: Set '-q --rm' in PORTAGE_COMPRESS_FLAGS to behave
28 like other compressors.
29
30
31 diff --git a/bin/ecompress b/bin/ecompress
32 index 6d47059da..3e4b77a45 100755
33 --- a/bin/ecompress
34 +++ b/bin/ecompress
35 @@ -71,9 +71,9 @@ while [[ $# -gt 0 ]] ; do
36 # note: to save time, we need to do this only if there's
37 # at least one compressed file
38 case ${path} in
39 - *.Z|*.gz|*.bz2|*.lzma|.lz4|*.xz|*.zst)
40 + *.Z|*.gz|*.bz2|*.lzma|.lz|.lzo|.lz4|*.xz|*.zst)
41 vpath=${path%.*}
42 - for comp in '' .Z .gz .bz2 .lzma .lz4 .xz .zst; do
43 + for comp in '' .Z .gz .bz2 .lzma .lz .lzo .lz4 .xz .zst; do
44 if [[ ${vpath}${comp} != ${path} && \
45 -e ${vpath}${comp} ]]; then
46 collisions[${path}]=1