[Libguestfs] [v2v PATCH 2/2] linux: ignore -devel kernel packages

Pino Toscano ptoscano at redhat.com
Tue Sep 22 17:00:45 UTC 2020


They usually contain only the sources of the kernel, useful to build
kernel modules.
---
 v2v/linux_kernels.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/v2v/linux_kernels.ml b/v2v/linux_kernels.ml
index dc0c285d..9a41225a 100644
--- a/v2v/linux_kernels.ml
+++ b/v2v/linux_kernels.ml
@@ -92,7 +92,7 @@ let detect_kernels (g : G.guestfs) inspect family bootloader =
     let kernel_pkgs = List.filter (
       fun { G.app2_name = name } ->
         name = "kernel"
-          || String.is_prefix name "kernel-"
+          || (String.is_prefix name "kernel-" && not (String.is_suffix name "-devel"))
           || String.is_prefix name "linux-image-"
     ) inspect.i_apps in
     if verbose () then (
-- 
2.26.2




More information about the Libguestfs mailing list