(hopefully) fix "outside of prefix" QA abort.
authorFabian Groffen <grobian@gentoo.org>
Thu, 10 May 2007 08:04:31 +0000 (08:04 -0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 10 May 2007 08:04:31 +0000 (08:04 -0000)
svn path=/main/branches/prefix/; revision=6515

bin/misc-functions.sh

index 5ede5ffc15a1b07af8e7e1c012ea0a8f73bf1969..0b947d19834082c0a6c5565d00fa4a2ca69e79b1 100644 (file)
@@ -196,25 +196,19 @@ install_qa_check() {
        fi
 
        if [[ -d ${ED}/${D} ]] ; then
-               declare -i INSTALLTOD=0
                find "${ED}/${D}" | \
                while read i ; do
                        eqawarn "QA Notice: /${i##${ED}/${D}} installed in \${ED}/\${D}"
-                       ((INSTALLTOD++))
                done
                die "Aborting due to QA concerns: ${INSTALLTOD} files installed in ${ED}/${D}"
-               unset INSTALLTOD
        fi
 
        if [[ -d ${ED}/${EPREFIX} ]] ; then
-               declare -i INSTALLTOD=0
                find "${ED}/${EPREFIX}/" | \
                while read i ; do
                        eqawarn "QA Notice: ${i#${ED}} double prefix"
-                       ((INSTALLTOD++))
                done
                die "Aborting due to QA concerns: ${INSTALLTOD} double prefix files installed"
-               unset INSTALLTOD
        fi
 
        if [[ -d ${D} ]] ; then
@@ -222,14 +216,14 @@ install_qa_check() {
                find ${D%/} | sed -e "s|^${D%/}||g" | \
                while read i ; do
                        if [[ ${#EPREFIX} -gt ${#i} && ${EPREFIX:0:${#i}} != ${i} ]] ; then
-                               echo "QA Notice: ${i} outside of prefix"
-                               ((INSTALLTOD++))
+                               eqawarn "QA Notice: ${i} outside of prefix"
+                               INSTALLTOD=1
                        elif [[ ${#EPREFIX} -le ${#i} && ${i:0:${#EPREFIX}} != ${EPREFIX} ]] ; then
-                               echo "QA Notice: ${i} outside of prefix"
-                               ((INSTALLTOD++))
+                               eqawarn "QA Notice: ${i} outside of prefix"
+                               INSTALLTOD=1
                        fi
                done
-               [[ $INSTALLTOD > 0 ]] && die "Aborting due to QA concerns: ${INSTALLTOD} files installed outside the prefix"
+               [[ $INSTALLTOD > 0 ]] && die "Aborting due to QA concerns: there are files installed outside the prefix"
                unset INSTALLTOD
        fi