[Libguestfs] [PATCH 2/3] GuestOS: Don't attempt to install an old kernel

Richard W.M. Jones rjones at redhat.com
Fri Feb 19 09:45:33 UTC 2010


On Tue, Feb 16, 2010 at 02:46:57PM +0000, Matthew Booth wrote:
> add_kernel was missing an _is_installed test for the kernel.
> ---
>  lib/Sys/VirtV2V/GuestOS/RedHat.pm |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
> index 5be124c..cd2f8e6 100644
> --- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm
> +++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
> @@ -543,6 +543,8 @@ sub add_kernel
>  
>      my $path = $app->{path};
>  
> +    return undef if($self->_is_installed($path));
> +
>      my @install;
>      # Install any kernel dependencies which aren't already installed
>      foreach my $dep (@{$app->{deps}}) {

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html




More information about the Libguestfs mailing list