From: Dodji Seketeli Date: Tue, 21 Mar 2023 17:18:19 +0000 (+0100) Subject: Bug 29911 - fedabipkgdiff forgets to provide some debuginfo RPMs to abipkgdiff X-Git-Tag: upstream/2.3~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=889f05f9352400c23739e7e573361e2f607d5f94;p=platform%2Fupstream%2Flibabigail.git Bug 29911 - fedabipkgdiff forgets to provide some debuginfo RPMs to abipkgdiff 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 --- 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,