From: Mark Wielaard <mark@klomp.org>
To: debugedit@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH] find-debuginfo: Prefix install_dir to PATH
Date: Thu, 29 Jun 2023 14:34:10 +0200 [thread overview]
Message-ID: <20230629123410.993614-1-mark@klomp.org> (raw)
Some distros install a symlink to find-debuginfo[.sh] under the
old /usr/lib/rpm/ path. But don't have symlinks there for other
helper tools like debugedit and sepdebugcrcfix. So those tools
are then not under the install_dir as find-debuginfo calculates
it. So instead of invoking those helper tools with a full install
dir path, prefix the install dir to the PATH so the tools can be
found there (or anywhere else on the PATH).
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
scripts/find-debuginfo.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/find-debuginfo.in b/scripts/find-debuginfo.in
index e7ac095..f87b777 100755
--- a/scripts/find-debuginfo.in
+++ b/scripts/find-debuginfo.in
@@ -101,7 +101,9 @@ EOF
}
# Figure out where we are installed so we can call other helper scripts.
+# Prefix to PATH to prefer tools from install dir.
install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+PATH=${install_dir}:$PATH
# With -g arg, pass it to strip on libraries or executables.
strip_g=false
@@ -457,7 +459,7 @@ do_file()
if [ "$no_recompute_build_id" = "true" ]; then
no_recompute="-n"
fi
- id=$(${install_dir}/debugedit -b "$debug_base_name" -d "$debug_dest_name" \
+ id=$(debugedit -b "$debug_base_name" -d "$debug_dest_name" \
$no_recompute -i \
${build_id_seed:+--build-id-seed="$build_id_seed"} \
-l "$SOURCEFILE" "$f") || exit
@@ -619,7 +621,7 @@ if $run_dwz \
# dwz invalidates .gnu_debuglink CRC32 in the main files.
cat "$ELFBINSFILE" |
(cd "$RPM_BUILD_ROOT"; \
- tr '\n' '\0' | xargs -0 ${install_dir}/sepdebugcrcfix usr/lib/debug)
+ tr '\n' '\0' | xargs -0 sepdebugcrcfix usr/lib/debug)
fi
fi
--
2.39.3
reply other threads:[~2023-06-29 12:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230629123410.993614-1-mark@klomp.org \
--to=mark@klomp.org \
--cc=debugedit@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).