From 199eb54f8c30d1c2cf82b15e6a3a40dc5dcf2f1f Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Tue, 27 Dec 2011 13:36:06 +0000 Subject: add support for $EXCLUDE_FROM_FULL_STRIP Add support for $EXCLUDE_FROM_FULL_STRIP regexp which makes find-debuginfo.sh only strip debugging symbols from the matched files (from Mandriva). This is useful for e.g. glibc where we don't want to fully strip some libraries to keep valgrind, gdb, etc. working without glibc-debug. --- NEWS | 3 +++ find-debuginfo.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index f73e90c..f05b195 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ - disable internal dep generator as we can't use it yet due to our external dep generator customizations +- add support for $EXCLUDE_FROM_FULL_STRIP regexp which makes + find-debuginfo.sh only strip debugging symbols from the matched files + (from Mandriva) Version 1.146 - 24 Dec 2011, by D.Morgan - Enable new internal dep generator ( needed for java packages) diff --git a/find-debuginfo.sh b/find-debuginfo.sh index 53aab9e..f9861ac 100755 --- a/find-debuginfo.sh +++ b/find-debuginfo.sh @@ -100,6 +100,7 @@ strip_to_debug() $strip_g && case "$(file -bi "$2")" in application/x-sharedlib*) g=-g ;; esac + [ -n "$EXCLUDE_FULL_REGEXP" ] && grep -E -q "$EXCLUDE_FULL_REGEXP" <<< "$2" && g=-g eu-strip --remove-comment $g $([ -n "$DISABLE_DEBUG" ] || echo -f "$1") "$2" || exit [ -n "$DISABLE_DEBUG" ] || chmod 444 "$1" || exit } @@ -183,6 +184,8 @@ $strict || strict_error=WARNING [[ -n "$EXCLUDE_FROM_STRIP" ]] && \ EXCLUDE_REGEXP=`perl -e 'print "(", join("|", @ARGV), ")"' $EXCLUDE_FROM_STRIP` +[[ -n "$EXCLUDE_FROM_FULL_STRIP" ]] && \ +EXCLUDE_FULL_REGEXP=`perl -e 'print "(", join("|", @ARGV), ")"' $EXCLUDE_FROM_FULL_STRIP` echo $EXCLUDE_REGEXP # Strip ELF binaries -- cgit v1.2.1