Detect invalid self-referencing install_names (sonames in the ELF world), such as...
authorFabian Groffen <grobian@gentoo.org>
Sun, 18 Jan 2009 15:03:35 +0000 (15:03 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 18 Jan 2009 15:03:35 +0000 (15:03 -0000)
svn path=/main/branches/prefix/; revision=12528

bin/misc-functions.sh

index ab72632c7b51f36d1e4c031003f9e371e19667f8..d5d71a87345741b5dbc8743b7a1a1cb3a4b08416 100644 (file)
@@ -417,6 +417,17 @@ install_qa_check() {
                install_name=${l%%;*}; l=${l#*;}
                needed=${l%%;*}; l=${l#*;}
 
+               # See if the self-reference install_name points to an existing
+               # and to be installed file.  This usually is a symlink for the
+               # major version.
+               if [[ ! -e ${D}${install_name} ]] ; then
+                       eqawarn "QA Notice: invalid self-reference install_name ${install_name} in ${obj}"
+                       # remember we are in an implicit subshell, that's
+                       # why we touch a file here ... ideally we should be
+                       # able to die correctly/nicely here
+                       touch "${T}"/.install_name_check_failed
+               fi
+
                # this is ugly, paths with spaces won't work
                reevaluate=0
                for lib in $(echo ${needed} | tr , ' '); do
@@ -438,7 +449,7 @@ install_qa_check() {
                                fi
                        fi
                done
-               if [[ reevaluate == 1 ]]; then
+               if [[ ${reevaluate} == 1 ]]; then
                        # install_name(s) have been changed, refresh data so we
                        # store the correct meta data
                        l=$(scanmacho -qyF '%a;%p;%S;%n' ${D}${obj})