]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-pydebuginfo.patch
- compress debuginfo sections with zlib (reduce /usr/lib/debug size).
[packages/rpm.git] / rpm-pydebuginfo.patch
1 --- rpm-4.5/scripts/find-debuginfo.sh   2008-08-18 22:54:31.109085807 +0300
2 +++ rpm-4.5/scripts/find-debuginfo.sh   2008-08-29 23:27:02.516217319 +0300
3 @@ -10,30 +10,38 @@
4  
5  LISTFILE=$BUILDDIR/debugfiles.list
6  SOURCEFILE=$BUILDDIR/debugsources.list
7 +DEBUGFILES=$BUILDDIR/debugfiles-add.list
8  
9  : > $SOURCEFILE
10 -: > $LISTFILE
11 +touch $LISTFILE
12  
13 -strip_to_debug()
14 -{
15 +strip_to_debug() {
16    objcopy --only-keep-debug --remove-section .comment "$2" "$1"
17    objcopy --add-gnu-debuglink="$1" "$2"
18  }
19  
20 +extract_debuginfo() {
21 +       :
22 +}
23 +
24  if [ ! -d $RPM_BUILD_ROOT ]; then
25         # no buildroot, exit
26         exit 0
27  fi
28  
29 +if [ -f $DEBUGFILES ]; then
30 +       cat $DEBUGFILES > $LISTFILE
31 +fi
32 +
33  filelist=$(find $RPM_BUILD_ROOT ! -path "$RPM_BUILD_ROOT/usr/lib/debug/*.debug" -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')')
34 -if [ -z "$filelist" ]; then
35 +if [ -z "$filelist" -a ! -f $DEBUGFILES ]; then
36         # no files, exit
37         exit 0
38  fi
39  
40  filetypes=$(echo "$filelist" | xargs -r -d'\n' file)
41  elflist=$(echo "$filetypes" | awk -F: '/ELF.*, not stripped/ {print $1}')
42 -if [ -z "$elflist" ]; then
43 +if [ -z "$elflist" -a ! -f $DEBUGFILES ]; then
44         # no elf objects, exit
45         exit 0
46  fi
47 @@ -74,2 +82,5 @@
48  find ${RPM_BUILD_ROOT}/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE
49 +if [ -f $DEBUGFILES ]; then
50 +       sed -e "s#^$RPM_BUILD_ROOT##" $DEBUGFILES >> $LISTFILE
51 +fi
52  find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE
This page took 0.023123 seconds and 3 git commands to generate.