diff options
-rwxr-xr-x | find-debuginfo.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/find-debuginfo.sh b/find-debuginfo.sh index 637db3b..d6d539f 100755 --- a/find-debuginfo.sh +++ b/find-debuginfo.sh @@ -9,6 +9,14 @@ fi LISTFILE=$BUILDDIR/debugfiles.list SOURCEFILE=$BUILDDIR/debugsources.list +debugedit=/usr/lib/rpm/debugedit +if [ ! -x $debugedit ]; then + # rpm5 since 5.2 has moved these binaries to a separate 'bin' subdirectory + if [ -x /usr/lib/rpm/bin/debugedit ]; then + debugedit=/usr/lib/rpm/bin/debugedit + fi +fi + debugdir="${RPM_BUILD_ROOT}/usr/lib/debug" echo -n > $SOURCEFILE @@ -32,7 +40,7 @@ do mkdir -p "${debugdn}" echo extracting debug info from $f - /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" + $debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" if test -w "$f"; then eu-strip -f "${debugfn}" "$f" || : else |