1 |
commit: 2a5be51673654d9605308f8c80d5588f67a5e8e0 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 5 04:22:05 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 5 04:22:46 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=2a5be516 |
7 |
|
8 |
etc-update: quote array expansions |
9 |
|
10 |
Reported-by: R0b0t1 <r030t1 <AT> gmail.com> |
11 |
|
12 |
bin/etc-update | 6 +++--- |
13 |
1 file changed, 3 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/bin/etc-update b/bin/etc-update |
16 |
index ea69f1478..7b48be215 100755 |
17 |
--- a/bin/etc-update |
18 |
+++ b/bin/etc-update |
19 |
@@ -767,7 +767,7 @@ portage_vars=( |
20 |
) |
21 |
|
22 |
if type -P portageq > /dev/null; then |
23 |
- eval $(${PORTAGE_PYTHON:+"${PORTAGE_PYTHON}"} "$(type -P portageq)" envvar -v ${portage_vars[@]}) |
24 |
+ eval $(${PORTAGE_PYTHON:+"${PORTAGE_PYTHON}"} "$(type -P portageq)" envvar -v "${portage_vars[@]}") |
25 |
else |
26 |
[[ $OS_FAMILY == 'gentoo' ]] && die "missing portageq" |
27 |
fi |
28 |
@@ -801,7 +801,7 @@ cfg_vars=( |
29 |
mode |
30 |
) |
31 |
# default them all to "" |
32 |
-eval ${cfg_vars[@]/%/=} |
33 |
+eval "${cfg_vars[@]/%/=}" |
34 |
# then extract them all from the conf in one shot |
35 |
# (ugly var at end is due to printf appending a '|' to last item) |
36 |
get_config "($(printf '%s|' "${cfg_vars[@]}")NOVARFOROLDMEN)" |
37 |
@@ -846,7 +846,7 @@ if ${NONINTERACTIVE_MV} ; then |
38 |
fi |
39 |
|
40 |
if ${VERBOSE} ; then |
41 |
- for v in ${portage_vars[@]} ${cfg_vars[@]} TMP SCAN_PATHS ; do |
42 |
+ for v in "${portage_vars[@]}" "${cfg_vars[@]}" TMP SCAN_PATHS ; do |
43 |
echo "${v}=${!v}" |
44 |
done |
45 |
fi |