commit b2c8bf4a45bc44c13d19718c9fd385a49816edaf
Author: Yi Yang <[email protected]>
Date: Fri Jan 7 15:09:20 2011 +0800
Clean up yum garbage info
Note: yum created a installroot dir under installroot dir and cached
some info which is nonsense and occupied tens of MB disk space, we
didn't notice this before or new version of yum introduced this,
anyway we can remove it safely.
diff --git a/mic/imgcreate/creator.py b/mic/imgcreate/creator.py
index 8d3fc9d..7d53a85 100644
--- a/mic/imgcreate/creator.py
+++ b/mic/imgcreate/creator.py
@@ -665,6 +665,10 @@ class ImageCreator(object):
os.unlink(self._instroot + "/etc/mtab")
if self.qemu_emulator:
os.unlink(self._instroot + self.qemu_emulator)
+ """ Clean up yum garbage """
+ instroot_pdir = os.path.dirname(self._instroot + self._instroot)
+ if os.path.exists(instroot_pdir):
+ shutil.rmtree(instroot_pdir, ignore_errors = True)
except OSError:
pass
_______________________________________________
MeeGo-distribution-tools mailing list
[email protected]
http://lists.meego.com/listinfo/meego-distribution-tools