chantra / rpms / rpm

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