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
5 LISTFILE=$BUILDDIR/debugfiles.list
6 SOURCEFILE=$BUILDDIR/debugsources.list
7 +DEBUGFILES=$BUILDDIR/debugfiles-add.list
16 objcopy --only-keep-debug --remove-section .comment "$2" "$1"
17 objcopy --add-gnu-debuglink="$1" "$2"
20 +extract_debuginfo() {
24 if [ ! -d $RPM_BUILD_ROOT ]; then
29 +if [ -f $DEBUGFILES ]; then
30 + cat $DEBUGFILES > $LISTFILE
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
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
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
52 find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE