public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] tools-utils: Looks for vmlinux binary in RPM debug package
@ 2023-03-06 15:50 Guillermo E. Martinez
  2023-03-07 18:57 ` [PATCH v2] abipkgdiff: Remove useless code to process kernel RPM packages Guillermo E. Martinez
  2023-03-08 14:34 ` [PATCH] tools-utils: Looks for vmlinux binary in RPM debug package Dodji Seketeli
  0 siblings, 2 replies; 5+ messages in thread
From: Guillermo E. Martinez @ 2023-03-06 15:50 UTC (permalink / raw)
  To: libabigail; +Cc: Guillermo E. Martinez

When Libabigail tools work with a `kernel' package, it looks for
`vmlinux' file in release RPM uncompress directory, if it is not
found, then try find it in `debug_info_root' directory.

	* src/abg-tools-utils.cc
	(get_binary_paths_from_kernel_dist): Add `debug_info_root' if
	`vmlinux' file is not found in `dist_root' directory.

Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
---
 src/abg-tools-utils.cc | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/abg-tools-utils.cc b/src/abg-tools-utils.cc
index 94dd8d05..8493ae90 100644
--- a/src/abg-tools-utils.cc
+++ b/src/abg-tools-utils.cc
@@ -2572,20 +2572,16 @@ get_binary_paths_from_kernel_dist(const string&	dist_root,
   string kernel_modules_root;
   string debug_info_root;
   if (dir_exists(dist_root + "/lib/modules"))
-    {
-      dist_root + "/lib/modules";
       debug_info_root = debug_info_root_path.empty()
-	? dist_root
+	? dist_root + "/usr/lib/debug"
 	: debug_info_root_path;
-      debug_info_root += "/usr/lib/debug";
-    }
 
   if (dir_is_empty(debug_info_root))
     debug_info_root.clear();
 
   bool found = false;
-  string from = dist_root;
-  if (find_vmlinux_and_module_paths(from, vmlinux_path, module_paths))
+  if (find_vmlinux_and_module_paths(dist_root, vmlinux_path, module_paths) ||
+      find_vmlinux_and_module_paths(debug_info_root, vmlinux_path, module_paths))
     found = true;
 
   std::sort(module_paths.begin(), module_paths.end());
-- 
2.39.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-10  7:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06 15:50 [PATCH] tools-utils: Looks for vmlinux binary in RPM debug package Guillermo E. Martinez
2023-03-07 18:57 ` [PATCH v2] abipkgdiff: Remove useless code to process kernel RPM packages Guillermo E. Martinez
2023-03-08 14:34 ` [PATCH] tools-utils: Looks for vmlinux binary in RPM debug package Dodji Seketeli
2023-03-09 23:31   ` Guillermo E. Martinez
2023-03-10  7:49   ` 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).