[PATCH] Remove /mnt/sysimage from target system after installation (#577627)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you guys agree that postAction in the AnacondaBackend base class is the 
right place for this? Or should it be in each of the sub-classes? It looks like
YumBackend is the only one right now.

---
 backend.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/backend.py b/backend.py
index 2ec2109..6fd4698 100644
--- a/backend.py
+++ b/backend.py
@@ -60,7 +60,13 @@ class AnacondaBackend:
         self._loopbackFile = None
 
     def postAction(self, anaconda):
-        pass
+        # Remove /mnt/sysimage/mnt/sysimage tree
+        try:
+            path = "/mnt/sysimage/mnt/sysimage"
+            shutil.rmtree(path)
+            log.info("Removed directory tree: %s" % path)
+        except Exception, e:
+            log.error("Unable to remove directory tree: %s %s" % (path, e))
 
     def doPreSelection(self, intf, id, instPath):
         pass
-- 
1.6.6.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux