chantra / rpms / rpm

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