Make the "always overflow" gcc warning code use a separate variable
authorZac Medico <zmedico@gentoo.org>
Fri, 10 Sep 2010 18:02:13 +0000 (11:02 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 10 Sep 2010 18:02:13 +0000 (11:02 -0700)
from the "implicit pointer" code in install_qa_check(), so they
don't interfere.

bin/misc-functions.sh

index 41de0fb946d7624585aac90e72ae4f28f58faf7d..f048b70d8400a6f81985d294b0600362eb316085 100755 (executable)
@@ -517,7 +517,7 @@ install_qa_check() {
        fi
 
        # Verify that the libtool files don't contain bogus $D entries.
-       local abort=no gentoo_bug=no
+       local abort=no gentoo_bug=no always_overflow=no
        for a in "${D}"usr/lib*/*.la ; do
                s=${a##*/}
                if grep -qs "${D}" "${a}" ; then
@@ -584,15 +584,27 @@ install_qa_check() {
                        # force C locale to work around slow unicode locales #160234
                        f=$(LC_ALL=C $grep_cmd "${m}" "${PORTAGE_LOG_FILE}")
                        if [[ -n ${f} ]] ; then
-                               vecho -ne '\n'
-                               eqawarn "QA Notice: Package has poor programming practices which may compile"
-                               eqawarn "           fine but exhibit random runtime failures."
-                               eqawarn "${f}"
-                               vecho -ne '\n'
                                abort="yes"
                                case "$m" in
-                                       ": warning: call to .* will always overflow destination buffer$") gentoo_bug=yes ;;
+                                       ": warning: call to .* will always overflow destination buffer$") always_overflow=yes ;;
                                esac
+                               if [[ $always_overflow = yes ]] ; then
+                                       eerror
+                                       eerror "QA Notice: Package has poor programming practices which may compile"
+                                       eerror "           but will almost certainly crash on 64bit architectures."
+                                       eerror
+                                       eerror "${f}"
+                                       eerror
+                                       eerror " Please file a bug about this at http://bugs.gentoo.org/"
+                                       eerror " with the maintaining herd of the package."
+                                       eerror
+                               else
+                                       vecho -ne '\n'
+                                       eqawarn "QA Notice: Package has poor programming practices which may compile"
+                                       eqawarn "           fine but exhibit random runtime failures."
+                                       eqawarn "${f}"
+                                       vecho -ne '\n'
+                               fi
                        fi
                done
                local cat_cmd=cat
@@ -633,7 +645,7 @@ install_qa_check() {
 
                fi
                if [[ ${abort} == "yes" ]] ; then
-                       if [[ ${gentoo_bug} == "yes" ]] ; then
+                       if [[ $gentoo_bug = yes || $always_overflow = yes ]] ; then
                                die "install aborted due to" \
                                        "poor programming practices shown above"
                        else