From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applied] Bug 29911 - fedabipkgdiff forgets to provide some debuginfo RPMs to abipkgdiff
Date: Wed, 22 Mar 2023 17:31:02 +0100 [thread overview]
Message-ID: <874jqcoiih.fsf@redhat.com> (raw)
Hello,
Some packages like foo-utils.rpm can be associated with two debuginfo
RPMs: One foo-utils-debuginfo.rpm and foo-debuginfo.rpm. This is
because the foo-debuginfo.rpm contains debug info that has been
factorized out of all the sub-packages of foo, foo-utils being one of
those sub-packages. In those cases, fedabipkgdiff needs to provide
foo-debuginfo.rpm and foo-utils-debuginfo.rpm to abipkgdiff so that it
can find all the necessary debuginfo.
This patch fixes fedabipkgdiff accordingly and adds some more logging
to abipkgdiff to make it emit an explicit message for cases like this.
* tools/abipkgdiff.cc (compare_to_self): Emit an error message
when in verbose mode, for cases where we fail to find the
alternate debug info.
* tools/fedabipkgdiff (generate_comparison_halves): Always provide
all associated debuginfo packages to abipkgdiff.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
tools/abipkgdiff.cc | 13 +++++++++++++
tools/fedabipkgdiff | 18 +++++-------------
2 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc
index 46b920a1..a2b6ab8b 100644
--- a/tools/abipkgdiff.cc
+++ b/tools/abipkgdiff.cc
@@ -1716,6 +1716,19 @@ compare_to_self(const elf_file& elf,
return abigail::tools_utils::ABIDIFF_ERROR;
}
+ else if (c_status & abigail::fe_iface::STATUS_ALT_DEBUG_INFO_NOT_FOUND)
+ {
+ if (opts.verbose)
+ emit_prefix("abipkgdiff", cerr)
+ << "Could not read find alternate DWARF debug info for '"
+ << elf.path
+ << "'. You might have forgotten to provide a debug info package\n";
+
+ if (detailed_error_status)
+ *detailed_error_status = c_status;
+
+ return abigail::tools_utils::ABIDIFF_ERROR;
+ }
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff
index c05bd8b1..db23d5a3 100755
--- a/tools/fedabipkgdiff
+++ b/tools/fedabipkgdiff
@@ -612,26 +612,18 @@ def generate_comparison_halves(rpm_col1, rpm_col2):
debuginfo_list1 = []
debuginfo_list2 = []
- # If this is a *devel* package we are looking at, then get all
- # the debug info packages associated to with the main package
- # and stick them into the resulting comparison half.
-
- if _rpm.is_devel:
- debuginfo_list1 = rpm_col1.get_all_debuginfo_rpms(_rpm)
- else:
- debuginfo_list1.append(rpm_col1.get_matching_debuginfo(_rpm))
+ # Get all debug info packages associated to with the main
+ # package and stick them into the resulting comparison half.
+ debuginfo_list1 = rpm_col1.get_all_debuginfo_rpms(_rpm)
devel1 = rpm_col1.get_sibling_devel(_rpm)
if global_config.self_compare:
debuginfo_list2 = debuginfo_list1
devel2 = devel1
else:
- if rpm2.is_devel:
- debuginfo_list2 = rpm_col2.get_all_debuginfo_rpms(rpm2)
- else:
- debuginfo_list2.append(rpm_col2.get_matching_debuginfo(rpm2))
- devel2 = rpm_col2.get_sibling_devel(rpm2)
+ debuginfo_list2 = rpm_col2.get_all_debuginfo_rpms(rpm2)
+ devel2 = rpm_col2.get_sibling_devel(rpm2)
yield (ComparisonHalf(subject=_rpm,
ancillary_debug=debuginfo_list1,
--
2.39.2
--
Dodji
reply other threads:[~2023-03-22 16:31 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=874jqcoiih.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=libabigail@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).