From 1c584e31cf0861c94332a5350614912b073616bc Mon Sep 17 00:00:00 2001 From: David Seifert Date: Mon, 11 Jan 2021 21:33:09 +0100 Subject: optfeature.eclass: [QA] Fix unwanted globbing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/498988 Reported-by: Mike Frysinger Suggested-by: Ulrich Müller Signed-off-by: David Seifert --- eclass/optfeature.eclass | 7 +++++-- 1 file 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}" -- cgit v1.2.3-65-gdbad