public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, applied] abipkgdiff: Don't use user-specific filesystem info in error msg
@ 2023-04-05 16:06 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2023-04-05 16:06 UTC (permalink / raw)
  To: libabigail

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(-)

diff --git a/tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt b/tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt
index 0188bc9b..951c66c7 100644
--- a/tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt
+++ b/tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt
@@ -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' ====
diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc
index d10706a9..69661c5b 100644
--- a/tools/abipkgdiff.cc
+++ b/tools/abipkgdiff.cc
@@ -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();
 }
-- 
2.39.2


-- 
		Dodji


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-05 16:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-05 16:06 [PATCH, applied] abipkgdiff: Don't use user-specific filesystem info in error msg Dodji Seketeli

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).