[Libguestfs] [PATCH] GuestOS: Reload augeas after rpm installation and removal

Matthew Booth mbooth at redhat.com
Tue Feb 16 15:03:46 UTC 2010


---
 lib/Sys/VirtV2V/GuestOS/RedHat.pm |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
index cd2f8e6..380dacb 100644
--- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm
+++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
@@ -862,6 +862,9 @@ sub remove_application
         $g->command(['rpm', '-e', $name]);
     };
     die($@) if($@);
+
+    # Make augeas reload in case the removal changed anything
+    $g->aug_load();
 }
 
 =item get_application_owner(file)
@@ -902,6 +905,9 @@ sub _install_rpms
 
     # Propagate command failure
     die($@) if($@);
+
+    # Reload augeas in case the rpm installation changed anything
+    $g->aug_load();
 }
 
 # Get full, local path of a file on the transfer mount
-- 
1.6.6




More information about the Libguestfs mailing list