Bug 21730 - Make abipkgdiff compare Linux Kernel packages as expected
This is the initial patch that makes abipkgdiff recognize Linux kernel
packages passed in argument and do the right thing.
abipkgdiff gets the vmlinux binary from the debug info package,
considers the union of that vmlinux binary and the thousands of kernel
modules that we shall name "the Kernel". It then compares ABI
(actually Kernel/Module Interface, a.k.a KMI) of the Kernel of the
first package against the KMI of the Kernel of the second package.
* include/abg-tools-utils.h (get_vmlinux_path_from_kernel_dist):
Declare new function.
(get_binary_paths_from_kernel_dist): Re-organize order of
parameters.
(file_is_kernel_package, file_is_kernel_debuginfo_package): Make
the file_path parameter be const.
(build_corpus_group_from_kernel_dist_under): Take an additional
debug_info_root parameter.
* src/abg-tools-utils.cc (file_is_kernel_package)
(file_is_kernel_debuginfo_package): Const-ify the file_name
parameter.
(find_vmlinux_path): Define new static function.
(get_binary_paths_from_kernel_dist): Re-organize the order of
parameters. The debug_info_root_path parameter is now an input
parameter.
(get_vmlinux_path_from_kernel_dist): Define new function.
(get_binary_paths_from_kernel_dist): Adjust invocation of
get_binary_paths_from_kernel_dist.
(build_corpus_group_from_kernel_dist_under): Take an additional
debug_info_root parameter.
* tools/abidw.cc (load_kernel_corpus_group_and_write_abixml):
Adjust invocation to build_corpus_group_from_kernel_dist_under.
* tools/abipkgdiff.cc (create_maps_of_package_content): Don't map
the content of a Linux Kernel package.
(compare_prepared_userspace_packages)
(compare_prepared_linux_kernel_packages, compare_prepared): Define
new functions.
(compare): Use the new functions above here.
* tools/kmidiff.cc (print_kernel_dist_binary_paths_under): Adjust
the invocation of get_binary_paths_from_kernel_dist.
(main): Adjust the invocation of
build_corpus_group_from_kernel_dist_under. Make sure that a
kernel package is accompanied by a debug info package.