summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2016-06-14 17:07:10 +0200
committerFlorian Festi <ffesti@redhat.com>2016-07-29 18:28:53 +0200
commit41c4dcf507e2208585d6dc0952f59686a3a69d69 (patch)
treedb392caff6db0393b49436ef29b8890445cca582
parent6b3b435fa644522197003460a96cd11253b1494d (diff)
downloadrpm-41c4dcf507e2208585d6dc0952f59686a3a69d69.tar.gz
Don't use hardcoded paths to tools/scripts in find-debuginfo.sh.
This prevents installation and testing in any other location than /usr/lib/rpm. Signed-off-by: Mark Wielaard <mjw@redhat.com>
-rw-r--r--scripts/find-debuginfo.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 8de7badbf..f02b6dc4c 100644
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -29,6 +29,9 @@
# All file names in switches are relative to builddir (. if not given).
#
+# Figure out where we are installed so we can call other helper scripts.
+lib_rpm_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
# With -g arg, pass it to strip on libraries or executables.
strip_g=false
@@ -286,7 +289,7 @@ while read nlinks inum f; do
fi
echo "extracting debug info from $f"
- id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \
+ id=$(${lib_rpm_dir}/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \
-i -l "$SOURCEFILE" "$f") || exit
if [ $nlinks -gt 1 ]; then
eval linkedid_$inum=\$id
@@ -296,7 +299,7 @@ while read nlinks inum f; do
$strict && exit 2
fi
- [ -x /usr/bin/gdb-add-index ] && /usr/bin/gdb-add-index "$f" > /dev/null 2>&1
+ [ type gdb-add-index >/dev/null 2>&1 && gdb-add-index "$f" > /dev/null 2>&1
# A binary already copied into /usr/lib/debug doesn't get stripped,
# just has its file names collected and adjusted.