Add --dwz-single-file-mode argument for find-debuginfo.sh.
authorMartin Liška <mliska@suse.cz>
Tue, 23 Mar 2021 14:09:03 +0000 (15:09 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 23 Mar 2021 14:37:48 +0000 (15:37 +0100)
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

index 675b8cf51cce72e54627e3c77b975787fa127719..3d736e040d7415a66cf7da1b2ab78b8adc1f50c4 100755 (executable)
@@ -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,9 @@
 # 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 dwz(1) -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 +115,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 +149,10 @@ while [ $# -gt 0 ]; do
     dwz_max_die_limit=$2
     shift
     ;;
+  --dwz-single-file-mode)
+    dwz_single_file_mode=true
+    shift
+    ;;
   --build-id-seed)
     build_id_seed=$2
     shift
@@ -538,7 +547,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}" ] \
This page took 0.06373 seconds and 5 git commands to generate.