]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-debuginfo.patch
backport --nopretrans, --noposttrans options
[packages/rpm.git] / rpm-debuginfo.patch
index a03bd5323695fc643752b0cc8d6d40207c6f270f..537f8bcf4cc426f4227f65486be5185c23063a63 100644 (file)
      %{__arch_install_post}\
      %{__os_install_post}\
  %{nil}
---- rpm-4.5/scripts/find-debuginfo.sh~ 2008-06-10 01:31:33.274524622 +0300
-+++ rpm-4.5/scripts/find-debuginfo.sh  2008-05-22 14:11:01.000000000 +0300
-@@ -1,32 +1,50 @@
- #!/bin/sh
--#find-debuginfo.sh - automagically generate debug info and file list
--#for inclusion in an rpm spec file.
-+# find-debuginfo.sh - automagically generate debug info and file list
-+# for inclusion in an rpm spec file.
--if [ -z "$1" ] ; then BUILDDIR="."
--else BUILDDIR=$1
-+if [ -z "$1" ]; then
-+      BUILDDIR="."
-+else
-+      BUILDDIR=$1
- fi
- LISTFILE=$BUILDDIR/debugfiles.list
- SOURCEFILE=$BUILDDIR/debugsources.list
--debugdir="${RPM_BUILD_ROOT}/usr/lib/debug"
--
--echo -n > $SOURCEFILE
-+: > $SOURCEFILE
-+: > $LISTFILE
- strip_to_debug()
- {
--  eu-strip --remove-comment -f "$1" "$2" || :
-+  objcopy --only-keep-debug --remove-section .comment "$2" "$1"
-+  objcopy --add-gnu-debuglink="$1" "$2"
- }
-+if [ ! -d $RPM_BUILD_ROOT ]; then
-+      # no buildroot, exit
-+      exit 0
-+fi
-+
-+filelist=$(find $RPM_BUILD_ROOT ! -path "$RPM_BUILD_ROOT/usr/lib/debug/*.debug" -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')')
-+if [ -z "$filelist" ]; then
-+      # no files, exit
-+      exit 0
-+fi
-+
-+filetypes=$(echo "$filelist" | xargs -r -d'\n' file)
-+elflist=$(echo "$filetypes" | awk -F: '/ELF.*, not stripped/ {print $1}')
-+if [ -z "$elflist" ]; then
-+      # no elf objects, exit
-+      exit 0
-+fi
-+
- # Strip ELF binaries
--for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
--      sed -n -e 's/^\(.*\):[  ]*.*ELF.*, not stripped/\1/p'`
--do
--      dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
--      bn=$(basename $f .debug).debug
--
--      debugdn="${debugdir}${dn}"
--      debugfn="${debugdn}/${bn}"
--      [ -f "${debugfn}" ] && continue
-+echo "$elflist" | while read f; do
-+      dn=$(dirname "${f#$RPM_BUILD_ROOT}")
-+      bn=$(basename "$f" .debug).debug
-+
-+      debugdn="$RPM_BUILD_ROOT/usr/lib/debug$dn"
-+      debugfn="$debugdn/$bn"
-+      [ -f "$debugfn" ] && continue
-       echo extracting debug info from $f
This page took 0.038864 seconds and 4 git commands to generate.