[Libguestfs] [PATCH v2 6/7] v2v: linux: check the kernel package name for Debian

Richard W.M. Jones rjones at redhat.com
Fri Aug 26 13:16:45 UTC 2016


On Fri, Aug 26, 2016 at 11:02:08AM +0200, Pino Toscano wrote:
> On Debian-based systems, the kernel packages are named like
> "linux-image-$kver", so check for them.
> ---
>  v2v/convert_linux.ml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
> index 6f96073..464ad49 100644
> --- a/v2v/convert_linux.ml
> +++ b/v2v/convert_linux.ml
> @@ -115,7 +115,8 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
>      filter_map (
>        function
>        | { G.app2_name = name } as app
> -          when name = "kernel" || String.is_prefix name "kernel-" ->
> +          when name = "kernel" || String.is_prefix name "kernel-"
> +               || String.is_prefix name "linux-image-" ->
>          (try
>             (* For each kernel, list the files directly owned by the kernel. *)
>             let files = Linux.file_list_of_package g inspect app in
> -- 

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list