diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-01-06 00:16:59 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-01-06 00:16:59 +0000 |
commit | 31e4e0d6c8f378ed7abc0fe8250d683924ed09c3 (patch) | |
tree | 8fd6e1f5480d02e11773d176811a2c0cd21c7a73 | |
parent | 679e5f802483ab2eb0fb55c35fb783f27e4153fb (diff) | |
download | portage-31e4e0d6c8f378ed7abc0fe8250d683924ed09c3.tar.gz portage-31e4e0d6c8f378ed7abc0fe8250d683924ed09c3.tar.bz2 portage-31e4e0d6c8f378ed7abc0fe8250d683924ed09c3.zip |
Fix shell glob logic that leads to false positives. Thanks to Flameeyes for reporting.
svn path=/main/trunk/; revision=5466
-rwxr-xr-x | bin/misc-functions.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 75b95ba09..68078714b 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -244,6 +244,7 @@ install_qa_check() { # http://bugs.gentoo.org/4411 abort="no" for a in "${D}"usr/lib*/*.a ; do + [[ ! -e ${a} ]] && continue s=${a%.a}.so if [[ ! -e ${s} ]] ; then s=${s%usr/*}${s##*/usr/} @@ -257,11 +258,17 @@ install_qa_check() { [[ ${abort} == "yes" ]] && die "add those ldscripts" # Make sure people don't store libtool files or static libs in /lib - f=$(ls "${D}"lib*/*.{a,la} 2>/dev/null) + f=() + for a in "${D}"lib*/*.{a,la} ; do + [[ ! -e ${a} ]] && continue + f=("${f[@]}" "${a}") + done if [[ -n ${f} ]] ; then vecho -ne '\a\n' - vecho "QA Notice: excessive files found in the / partition\a" - vecho "${f}" + vecho "QA Notice: excessive files found in the / partition" + for a in "${f[@]}" ; do + vecho "${a}" + done vecho -ne '\a\n' die "static archives (*.a) and libtool library files (*.la) do not belong in /" fi @@ -269,6 +276,7 @@ install_qa_check() { # Verify that the libtool files don't contain bogus $D entries. abort="no" for a in "${D}"usr/lib*/*.la ; do + [[ ! -e ${a} ]] && continue s=${a##*/} if grep -qs "${D}" "${a}" ; then vecho -ne '\a\n' |