summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2021-01-11 21:33:09 +0100
committerDavid Seifert <soap@gentoo.org>2021-01-11 21:33:09 +0100
commit1c584e31cf0861c94332a5350614912b073616bc (patch)
tree73870f40671501b7902cca309e3efa1e37aef59f /eclass
parentdev-ml/markup: fix test and use dune eclass (diff)
downloadgentoo-1c584e31cf0861c94332a5350614912b073616bc.tar.gz
gentoo-1c584e31cf0861c94332a5350614912b073616bc.tar.bz2
gentoo-1c584e31cf0861c94332a5350614912b073616bc.zip
optfeature.eclass: [QA] Fix unwanted globbing
Closes: https://bugs.gentoo.org/498988 Reported-by: Mike Frysinger <vapier@gentoo.org> Suggested-by: Ulrich Müller <ulm@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/optfeature.eclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/optfeature.eclass b/eclass/optfeature.eclass
index 1943ae37bf5e..e13fc3eba811 100644
--- a/eclass/optfeature.eclass
+++ b/eclass/optfeature.eclass
@@ -32,11 +32,13 @@ optfeature() {
debug-print-function ${FUNCNAME} "$@"
local i j msg
+ local -a arr
local desc=$1
local flag=0
shift
for i; do
- for j in ${i}; do
+ read -r -d '' -a arr <<<"${i}"
+ for j in "${arr[@]}"; do
if has_version "${j}"; then
flag=1
else
@@ -50,8 +52,9 @@ optfeature() {
done
if [[ ${flag} -eq 0 ]]; then
for i; do
+ read -r -d '' -a arr <<<"${i}"
msg=" "
- for j in ${i}; do
+ for j in "${arr[@]}"; do
msg+=" ${j} and"
done
msg="${msg:0: -4} for ${desc}"