abipkgdiff: Don't use full Linux kernel pkg path in change reports

Message ID 875xl7h9uz.fsf@redhat.com
State New
Headers
Series abipkgdiff: Don't use full Linux kernel pkg path in change reports |

Commit Message

Dodji Seketeli Feb. 18, 2025, 9:37 a.m. UTC
  Hello,

When comparing sets of Linux kernel packages, do not mention the
absolute path to the packages, but rather just their base names.
Otherwise, depending on where the package is located, the test results
are going to be artificially false.

	* tools/abipkgdiff.cc
	(compare_prepared_linux_kernel_package_sets): Use the base name of
	input RPMs in the output message.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
 tools/abipkgdiff.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc
index 7f6841ae..aae23577 100644
--- a/tools/abipkgdiff.cc
+++ b/tools/abipkgdiff.cc
@@ -3594,13 +3594,13 @@  compare_prepared_linux_kernel_package_sets(const package_set_sptr& first_ps,
   if (status & abigail::tools_utils::ABIDIFF_ABI_CHANGE)
     {
       cout << "== Kernel ABI changes between packages '"
-	   << first_core_kernel_package->path() << "' and '"
-	   << second_core_kernel_package->path() << "' are: ===\n";
+	   << first_core_kernel_package->base_name() << "' and '"
+	   << second_core_kernel_package->base_name() << "' are: ===\n";
       diff->report(cout);
       cout << "== End of kernel ABI changes between packages '"
-	   << first_core_kernel_package->path()
+	   << first_core_kernel_package->base_name()
 	   << "' and '"
-	   << second_core_kernel_package->path() << "' ===\n\n";
+	   << second_core_kernel_package->base_name() << "' ===\n\n";
     }
 
   return status;