summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-05-30 03:52:27 +0000
committerZac Medico <zmedico@gentoo.org>2006-05-30 03:52:27 +0000
commit346e3f558b6c60106558c892ca215cd8462266fd (patch)
treea445488d0ff79991c2d43eed755f6a3adcbe9d3f
parenteverybody hates repoman failing on modular X, so make it a warning (diff)
downloadportage-multirepo-346e3f558b6c60106558c892ca215cd8462266fd.tar.gz
portage-multirepo-346e3f558b6c60106558c892ca215cd8462266fd.tar.bz2
portage-multirepo-346e3f558b6c60106558c892ca215cd8462266fd.zip
Fix prepstrip so that it properly distiguishes between stripped and unstripped binaries for bug #133420. Thanks to robbat2 for this patch.
svn path=/main/trunk/; revision=3440
-rwxr-xr-xbin/prepstrip13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/prepstrip b/bin/prepstrip
index a27b1c26..6a308895 100755
--- a/bin/prepstrip
+++ b/bin/prepstrip
@@ -45,7 +45,18 @@ save_elf_debug() {
fi
}
-for x in $(scanelf -yRBF%F "$@") $(for y in "$@"; do find "${y}" -type f -name '*.a' -print ; done); do
+# The existance of the section .symtab tells us that a binary is stripped.
+# We want to log already stripped binaries, as this may be a QA violation.
+# They prevent us from getting the splitdebug data.
+f="$(scanelf -yqRBF '#k%F' -k '!.symtab' "$@")"
+if [[ -n "${f}" ]] ; then
+ vecho -e "\n\aQA Notice: pre-stripped files found:\a"
+ vecho "${f}"
+ echo "${f}" > "${T}"/scanelf-already-stripped.log
+fi
+
+# Now we look for unstripped binaries.
+for x in $(scanelf -yqRBF '#k%F' -k '.symtab' "$@") $(for y in "$@"; do find "${y}" -type f -name '*.a' -print ; done); do
if [[ ${banner} -eq 1 ]] ; then
vecho "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}"
banner=0