aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2011-12-27 13:36:06 +0000
committerAnssi Hannula <anssi@mageia.org>2011-12-27 13:36:06 +0000
commit199eb54f8c30d1c2cf82b15e6a3a40dc5dcf2f1f (patch)
tree14426df960fb7085ba2dabdea07d14bd10861d70
parent2d758f2ead933e0851c783ac6b5a8a0acadea7fa (diff)
downloadrpm-setup-199eb54f8c30d1c2cf82b15e6a3a40dc5dcf2f1f.tar
rpm-setup-199eb54f8c30d1c2cf82b15e6a3a40dc5dcf2f1f.tar.gz
rpm-setup-199eb54f8c30d1c2cf82b15e6a3a40dc5dcf2f1f.tar.bz2
rpm-setup-199eb54f8c30d1c2cf82b15e6a3a40dc5dcf2f1f.tar.xz
rpm-setup-199eb54f8c30d1c2cf82b15e6a3a40dc5dcf2f1f.zip
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.
-rw-r--r--NEWS3
-rwxr-xr-xfind-debuginfo.sh3
2 files changed, 6 insertions, 0 deletions
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