--- rpm-5.4.16/scripts/find-debuginfo.sh~ 2016-03-16 00:18:58.000000000 +0200 +++ rpm-5.4.16/scripts/find-debuginfo.sh 2016-03-16 00:19:29.577542080 +0200 @@ -29,6 +29,11 @@ strict=false RPM_BUILD_DIR="$(pwd)" +# canon RPM_BUILD_DIR, the DW_AT_comp_dir in ELF objects is real a real path +# and debugedit will ignore them as they are out of build dir. +RPM_BUILD_DIR=$(readlink -f "$RPM_BUILD_DIR") +echo "RPM_BUILD_DIR=$RPM_BUILD_DIR" + BUILDDIR=. out=debugfiles.list nout=0 @@ -201,6 +203,11 @@ $strict && exit 2 fi + if [ ! -s "$SOURCEFILE" ]; then + echo >&2 "*** ${strict_error}: no sources found for $f (stripped without sourcefile information?)" + $strict && exit 2 + fi + [ -x /usr/bin/gdb-add-index ] && /usr/bin/gdb-add-index "$f" > /dev/null 2>&1 # A binary already copied into /usr/lib/debug doesn't get stripped,