summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-24 03:43:44 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-24 03:43:44 +0000
commit16e1443f5b969047299b1f73992f3eacd131e1c5 (patch)
treed9931e661319c69235f9d843188f32116b0ba8fe
parentfd034eb741ff31e48e4831b67d8e3c2fa32ce63e (diff)
downloadportage-16e1443f5b969047299b1f73992f3eacd131e1c5.tar.gz
portage-16e1443f5b969047299b1f73992f3eacd131e1c5.tar.bz2
portage-16e1443f5b969047299b1f73992f3eacd131e1c5.zip
Bug #251976 - Add a QA_PRESTRIPPED variable for ebuilds to disable warnings about
pre-stripped files. svn path=/main/trunk/; revision=12296
-rwxr-xr-xbin/prepstrip26
-rw-r--r--man/ebuild.55
2 files changed, 27 insertions, 4 deletions
diff --git a/bin/prepstrip b/bin/prepstrip
index 33bdb2209..4fb0760cd 100755
--- a/bin/prepstrip
+++ b/bin/prepstrip
@@ -80,12 +80,30 @@ 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 [[ -s $log && ${QA_STRICT_PRESTRIPPED-unset} = unset ]] ; then
+ if [[ ${#QA_DT_HASH[@]} -gt 1 ]] ; then
+ for x in "${QA_PRESTRIPPED[@]}" ; do
+ sed -e "s#^${x#/}\$##" -i "$log"
+ done
+ else
+ local shopts=$-
+ set -o noglob
+ for x in $QA_PRESTRIPPED ; do
+ sed -e "s#^${x#/}\$##" -i "$log"
+ done
+ set +o noglob
+ set -$shopts
+ fi
+ 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
diff --git a/man/ebuild.5 b/man/ebuild.5
index 02069b44e..7e9a477fc 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -484,6 +484,11 @@ The paths may contain regular expressions.
This should contain a list of file paths, relative to the image directory, of
files that contain .hash sections. The paths may contain regular expressions
with escape\-quoted special characters.
+.TP
+\fBQA_PRESTRIPPED\fR
+This should contain a list of file paths, relative to the image directory, of
+files that contain pre-stripped binaries. The paths may contain regular
+expressions with escape\-quoted special characters.
.SH "PORTAGE DECLARATIONS"
.TP
.B inherit