commit: f7cf28051d9d65004083332448b9a4348474ce87
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Thu May 29 21:57:27 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 30 07:35:54 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f7cf2805
80multilib-strict: localise variables sensibly
Localise IFS so as to guarantee the default word splitting behaviour.
Evaluate the 'abort' variable arithmetically.
Jettison the 'x' variable. There already exists a 'dir' variable; there
is no need for another.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/install-qa-check.d/80multilib-strict | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/bin/install-qa-check.d/80multilib-strict
b/bin/install-qa-check.d/80multilib-strict
index 1a2f65820d..9b687961b4 100644
--- a/bin/install-qa-check.d/80multilib-strict
+++ b/bin/install-qa-check.d/80multilib-strict
@@ -1,11 +1,12 @@
# Strict multilib directory checks
multilib_strict_check() {
+ local IFS abort dir file
+
if has multilib-strict ${FEATURES} && \
type find &>/dev/null && type file &>/dev/null && \
[[ -n ${MULTILIB_STRICT_DIRS} && -n ${MULTILIB_STRICT_DENY} ]]
then
rm -f "${T}/multilib-strict.log"
- local abort=no dir file
for dir in ${MULTILIB_STRICT_DIRS} ; do
[[ -d ${ED}/${dir} ]] || continue
while read -r -d '' file; do
@@ -24,14 +25,13 @@ multilib_strict_check() {
set -${shopts}
fi
if [ "${QA_STRICT_MULTILIB_PATHS-unset}" = unset ] ;
then
- local x
- for x in "${QA_MULTILIB_PATHS[@]}" ; do
- sed -e "s#^${x#/}\$##" -i
"${T}/multilib-strict.log"
+ for dir in "${QA_MULTILIB_PATHS[@]}" ; do
+ sed -e "s#^${dir#/}\$##" -i
"${T}/multilib-strict.log"
done
sed -e "/^\$/d" -i "${T}/multilib-strict.log"
fi
if [[ -s ${T}/multilib-strict.log ]] ; then
- abort=yes
+ abort=1
echo "Files matching a file type that is not
allowed:"
while read -r ; do
echo " ${REPLY}"
@@ -39,7 +39,7 @@ multilib_strict_check() {
fi
fi
- [[ ${abort} == yes ]] && die "multilib-strict check failed!"
+ (( abort )) && die "multilib-strict check failed!"
fi
}