[applied] Bug 29911 - fedabipkgdiff forgets to provide some debuginfo RPMs to abipkgdiff
Commit Message
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(-)
@@ -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)
@@ -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,