[applied] abipkgdiff: Don't use user-specific filesystem info in error msg
Commit Message
Hello,
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>
---
.../libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt | 2 +-
tools/abipkgdiff.cc | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
@@ -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' ====
@@ -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();
}