Due to the implicit subshell caused by the pipe abort wasn't ever set,
authorFabian Groffen <grobian@gentoo.org>
Sat, 3 Nov 2007 19:26:31 +0000 (19:26 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 3 Nov 2007 19:26:31 +0000 (19:26 -0000)
even though it should have.  Now we die early, with help of die() being
able to die in this case.

svn path=/main/branches/prefix/; revision=8399

bin/misc-functions.sh

index ac50ed89f602ff418c5dbf8e62b7dcb5ebb1caef..38b5c273498f2b89cb6185cdea01bcf7eabb9c8e 100644 (file)
@@ -229,7 +229,7 @@ install_qa_check() {
                # .sos.  In addition the version component is before the
                # extension, not after it.  Check for this, and *only* warn
                # about it.  Some packages do ship .so files on Darwin and make
-               # it work (ugly! e.g. python does this by default).
+               # it work (ugly!).
                f=""
                find ${ED%/} -name "*.so" -or -name "*.so.*" | \
                while read i ; do
@@ -336,7 +336,6 @@ install_qa_check() {
 
        # Check that we don't get kernel traps at runtime because of broken
        # install_names on Darwin
-       abort="no"
        [[ ${CHOST} == *-darwin* ]] && find "${ED}" -type f | while read f ; do
                otool -LX "${f}" \
                        | grep -v "Archive : " \
@@ -353,12 +352,13 @@ install_qa_check() {
                                                "${r}" "${s}" "${f}"
                                else
                                        eqawarn "QA Notice: invalid reference to ${r} in ${f}"
-                                       abort="yes"
+                                       # remember we are in an implicit subshell, that's
+                                       # why we die here
+                                       die "invalid install_name found, ${f} will crash at runtime -- there may be possibly more affected files"
                                fi
                        fi
                done
        done
-       [[ ${abort} == "yes" ]] && die "invalid install_names found, objects will crash at runtime"
 
        # Evaluate misc gcc warnings
        if [[ -n ${PORTAGE_LOG_FILE} && -r ${PORTAGE_LOG_FILE} ]] ; then