From 257e5b661ab7e71babbe8b70c1cdb31e8373ed12 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 10 Sep 2010 11:02:13 -0700 Subject: [PATCH] Make the "always overflow" gcc warning code use a separate variable from the "implicit pointer" code in install_qa_check(), so they don't interfere. --- bin/misc-functions.sh | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 41de0fb94..f048b70d8 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -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 -- 2.26.2