Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Fri, 28 Sep 2018 20:33:12
Message-Id: 1538166753.519b35146fdd334dbc2d5168c06ec167d1fc7084.mgorny@gentoo
1 commit: 519b35146fdd334dbc2d5168c06ec167d1fc7084
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 28 07:16:58 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 28 20:32:33 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=519b3514
7
8 Revert "ecompress-file: de-duplicate filtered_args (bug 667072)"
9
10 Reverts: 1fc311ce0afeef9f982213e43220d079a4ffec26
11 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
12 Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
13
14 bin/ecompress-file | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17 diff --git a/bin/ecompress-file b/bin/ecompress-file
18 index e65b21ee4..18269c91b 100755
19 --- a/bin/ecompress-file
20 +++ b/bin/ecompress-file
21 @@ -13,7 +13,7 @@ compress_file() {
22 done
23 set +f
24 mask_ext_re="^(${mask_ext_re:1})\$"
25 - local -A filtered_args
26 + local filtered_args=()
27 local had_precompressed=
28 for x in "$@" ; do
29 [[ ${x##*.} =~ $mask_ext_re ]] && continue
30 @@ -35,10 +35,10 @@ compress_file() {
31 had_precompressed=1;;
32 esac
33
34 - filtered_args[${x}]=
35 + filtered_args+=( "$x" )
36 done
37 [[ ${#filtered_args[@]} -eq 0 ]] && return 0
38 - set -- "${!filtered_args[@]}"
39 + set -- "${filtered_args[@]}"
40
41 if [[ ${had_precompressed} ]]; then
42 eqawarn "One or more compressed files were found in docompress-ed directories."