chantra / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
be9911
--- rpm-4.11.3/scripts/find-debuginfo.sh.old	2018-05-03 09:53:34.098654333 +0200
be9911
+++ rpm-4.11.3/scripts/find-debuginfo.sh	2018-05-03 13:35:32.092303548 +0200
be9911
@@ -9,7 +9,7 @@
be9911
 #			   [[-l filelist]... [-p 'pattern'] -o debuginfo.list]
be9911
 #			   [builddir]
be9911
 #
be9911
-# The -g flag says to use strip -g instead of full strip on DSOs.
be9911
+# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
be9911
 # The --strict-build-id flag says to exit with failure status if
be9911
 # any ELF binary processed fails to contain a build-id note.
be9911
 # The -r flag says to use eu-strip --reloc-debug-sections.
be9911
@@ -29,7 +29,7 @@
be9911
 # All file names in switches are relative to builddir (. if not given).
be9911
 #
be9911
 
be9911
-# With -g arg, pass it to strip on libraries.
be9911
+# With -g arg, pass it to strip on libraries or executables.
be9911
 strip_g=false
be9911
 
be9911
 # with -r arg, pass --reloc-debug-sections to eu-strip.
be9911
@@ -130,6 +130,7 @@
be9911
   $strip_r && r=--reloc-debug-sections
be9911
   $strip_g && case "$(file -bi "$2")" in
be9911
   application/x-sharedlib*) g=-g ;;
be9911
+  application/x-executable*) g=-g ;;
be9911
   esac
be9911
   eu-strip --remove-comment $r $g -f "$1" "$2" || exit
be9911
   chmod 444 "$1" || exit