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

Matthew Booth mbooth at redhat.com
Tue Feb 16 14:46:57 UTC 2010


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}}) {
-- 
1.6.6




More information about the Libguestfs mailing list