abipkgdiff: Don't use user-specific filesystem info in error msg

The recent patch "Bug rhbz#2182807 --  abipkgdiff crashes on missing debuginfo package"
inadvertently introduced user-specific filesystem information in error
messages, making tests/runtestdiffpkg be non-deterministic.  Fixed
thus.

	* tools/abipkgdiff.cc (get_pretty_printed_list_of_packages): Emit
	base names of packages, not the absolute filesystem path.
	* tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt:
	Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2023-04-04 15:27:22 +02:00
parent fee06608fc
commit 5a6c04c8bd
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
abipkgdiff: ==== Error happened during processing of 'libxfce4uiglade.so' ====
abipkgdiff: could not find alternate debug info:
abipkgdiff: While reading elf file 'libxfce4uiglade.so', could not find alternate debug info in provided debug info package(s) '/home/dodji/git/libabigail/fixes/tests/data/test-diff-pkg/libxfce4ui-devel-debuginfo-4.12.1-8.fc27.ppc64.rpm'
abipkgdiff: While reading elf file 'libxfce4uiglade.so', could not find alternate debug info in provided debug info package(s) 'libxfce4ui-devel-debuginfo-4.12.1-8.fc27.ppc64.rpm'
abipkgdiff: The alternate debug info file being looked for is: ../../../../.dwz/libxfce4ui-4.12.1-8.fc27.ppc64
abipkgdiff: You must provide the additional debug info package that contains that alternate debug info file, using an additional --d1/--d2 switch
abipkgdiff: ==== End of error for 'libxfce4uiglade.so' ====

View File

@ -2421,11 +2421,13 @@ get_pretty_printed_list_of_packages(const vector<string>& packages)
std::stringstream o;
for (auto p : packages)
{
string filename;
tools_utils::base_name(p, filename);
if (need_comma)
o << ", ";
else
need_comma = true;
o << "'" << p << "'";
o << "'" << filename << "'";
}
return o.str();
}