diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-12-25 01:27:20 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-12-25 01:27:20 +0000 |
commit | 55ca8c6e65f323a3f5a558a4e116c3bebd4ce2d7 (patch) | |
tree | a6742a4866a7cb8f08c6ac0a9356a44dc319b6a2 /bin/prepstrip | |
parent | 55296bf7b03e377f9fbc6b1355524e075dc1dce1 (diff) | |
download | portage-55ca8c6e65f323a3f5a558a4e116c3bebd4ce2d7.tar.gz portage-55ca8c6e65f323a3f5a558a4e116c3bebd4ce2d7.tar.bz2 portage-55ca8c6e65f323a3f5a558a4e116c3bebd4ce2d7.zip |
Bug #251976 - Add a QA_PRESTRIPPED variable for ebuilds to disable warnings about
pre-stripped files. (trunk r12295:12300)
svn path=/main/branches/2.1.6/; revision=12323
Diffstat (limited to 'bin/prepstrip')
-rwxr-xr-x | bin/prepstrip | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/prepstrip b/bin/prepstrip index 33bdb2209..3e4473314 100755 --- a/bin/prepstrip +++ b/bin/prepstrip @@ -80,12 +80,25 @@ save_elf_debug() { # They prevent us from getting the splitdebug data. if ! hasq binchecks ${RESTRICT} && \ ! hasq strip ${RESTRICT} ; then - f=$(scanelf -yqRBF '#k%F' -k '!.symtab' "$@") - if [[ -n ${f} ]] ; then + log=$T/scanelf-already-stripped.log + scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^$D##" > "$log" + if [[ -n $QA_PRESTRIPPED && -s $log && \ + ${QA_STRICT_PRESTRIPPED-unset} = unset ]] ; then + shopts=$- + set -o noglob + for x in $QA_PRESTRIPPED ; do + sed -e "s#^${x#/}\$##" -i "$log" + done + set +o noglob + set -$shopts + fi + sed -e "/^\$/d" -e "s#^#/#" -i "$log" + if [[ -s $log ]] ; then vecho -e "\a\n" eqawarn "QA Notice: Pre-stripped files found:" - eqawarn "${f}" - echo "${f}" > "${T}"/scanelf-already-stripped.log + eqawarn "$(<"$log")" + else + rm -f "$log" fi fi |