rpm/dwz-compression.patch

22 lines
1.1 KiB
Diff

diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 73275a11c..3dc438ce5 100755
--- scripts/find-debuginfo.sh
+++ scripts/find-debuginfo.sh
@@ -486,6 +486,7 @@ if $run_dwz \
&& [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug | LC_ALL=C sort)
if [ ${#dwz_files[@]} -gt 0 ]; then
+ size_before=$(du -sk ${RPM_BUILD_ROOT}/usr/lib/debug | cut -f1)
dwz_multifile_name="${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}-${RPM_PACKAGE_RELEASE}.${RPM_ARCH}"
dwz_multifile_suffix=
dwz_multifile_idx=0
@@ -508,6 +509,8 @@ if $run_dwz \
echo >&2 "*** ERROR: DWARF compression requested, but no dwz installed"
exit 2
fi
+ size_after=$(du -sk ${RPM_BUILD_ROOT}/usr/lib/debug | cut -f1)
+ echo "original debug info size: ${size_before}kB, size after compression: ${size_after}kB"
# Remove .dwz directory if empty
rmdir "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz" 2>/dev/null
if [ -f "${RPM_BUILD_ROOT}/usr/lib/debug/.dwz/${dwz_multifile_name}" ]; then