public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: debugedit@sourceware.org
Subject: [PATCH] Add --dwz-single-file-mode argument for find-debuginfo.sh.
Date: Tue, 23 Mar 2021 15:09:03 +0100	[thread overview]
Message-ID: <1bab6d9a-67d3-3ec1-af8e-d002cd1508d4@suse.cz> (raw)

Sometime it's handy to disable multi-file mode and the patch
adds option for that: --dwz-single-file-mode.

It will be used in openSUSE for packages that use baselibs.conf
mechanism.

The patch was already approved in rpm pull request:
https://github.com/rpm-software-management/rpm/pull/1579

Signed-off-by: Martin Liska <mliska@suse.cz>
---
  scripts/find-debuginfo.sh | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 675b8cf..63f7e28 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -25,6 +25,7 @@
  #	 		   [-S debugsourcefiles.list]
  #			   [--run-dwz] [--dwz-low-mem-die-limit N]
  #			   [--dwz-max-die-limit N]
+#			   [--dwz-single-file-mode]
  #			   [--build-id-seed SEED]
  #			   [--unique-debug-suffix SUFFIX]
  #			   [--unique-debug-src-base BASE]
@@ -60,6 +61,8 @@
  # The --run-dwz flag instructs find-debuginfo.sh to run the dwz utility
  # if available, and --dwz-low-mem-die-limit and --dwz-max-die-limit
  # provide detailed limits.  See dwz(1) -l and -L option for details.
+# Use --dwz-single-file-mode to disable multi-file mode, see -m
+# for more details.
  #
  # If --build-id-seed SEED is given then debugedit is called to
  # update the build-ids it finds adding the SEED as seed to recalculate
@@ -111,6 +114,7 @@ no_recompute_build_id=false
  run_dwz=false
  dwz_low_mem_die_limit=
  dwz_max_die_limit=
+dwz_single_file_mode=false
  
  # build id seed given by the --build-id-seed option
  build_id_seed=
@@ -144,6 +148,9 @@ while [ $# -gt 0 ]; do
      dwz_max_die_limit=$2
      shift
      ;;
+  --dwz-single-file-mode)
+    dwz_single_file_mode=true
+    ;;
    --build-id-seed)
      build_id_seed=$2
      shift
@@ -538,7 +545,7 @@ if $run_dwz \
      done
      dwz_multifile_name="${dwz_multifile_name}${dwz_multifile_suffix}"
      dwz_opts="-h -q -r"
-    [ ${#dwz_files[@]} -gt 1 ] \
+    [ ${#dwz_files[@]} -gt 1 ] && [ "$dwz_single_file_mode" = "false" ] \
        && dwz_opts="${dwz_opts} -m .dwz/${dwz_multifile_name}"
      mkdir -p "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz"
      [ -n "${dwz_low_mem_die_limit}" ] \
-- 
2.30.2


             reply	other threads:[~2021-03-23 14:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 14:09 Martin Liška [this message]
2021-03-23 14:50 ` Mark Wielaard

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=1bab6d9a-67d3-3ec1-af8e-d002cd1508d4@suse.cz \
    --to=mliska@suse.cz \
    --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).