tools-utils: Fix looking for vmlinux binary in debuginfo package
authorGuillermo E. Martinez <guillermo.e.martinez@oracle.com>
Mon, 6 Mar 2023 15:50:38 +0000 (09:50 -0600)
committerDodji Seketeli <dodji@redhat.com>
Wed, 8 Mar 2023 14:21:16 +0000 (15:21 +0100)
commitdc375bd1b7f15f41665f002ec61f68ce1e7ff889
tree767aaa12ab4d4a68b23ec2d5828186236c2eed59
parentacfa51d52d1d56f0f7e360a20d6a2fe52e1d5b35
tools-utils: Fix looking for vmlinux binary in debuginfo package

When abipkgdiff is invoked on a `kernel' package,
compare_prepared_linux_kernel_packages fails to look for the `vmlinux'
file from the debuginfo package, because of a thinko.

Then, build_corpus_group_from_kernel_dist_under, also fails to find
`vmlinux' from the debuginfo package because of another thinko.

This patch fixes the two thinkos.

* src/abg-tools-utils.cc
(get_binary_paths_from_kernel_dist): Fix a thinko and really use
the kernel_modules_root variable.  Look for modules under
kernel_modules_root and look for vmlinux (if necessary) under
debug_info_root. Add comments.
(compare_prepared_linux_kernel_packages): Fix another thinko.  Now
we do have the path to vmlinux, from debuginfo packages before
getting into get_binary_paths_from_kernel_dist.

Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-tools-utils.cc
tools/abipkgdiff.cc