From c39d130b606fffc3f886a11b1de98874291a6db0 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Thu, 9 Oct 2008 21:56:23 -1000 Subject: [PATCH] Create a run() method for InstRoot and call private methods correctly. --- src/pylorax/instroot.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/pylorax/instroot.py b/src/pylorax/instroot.py index 42831ace..788353f0 100644 --- a/src/pylorax/instroot.py +++ b/src/pylorax/instroot.py @@ -68,17 +68,25 @@ class InstRoot: # the directory where the instroot will be created self.destdir = os.path.join(self.treedir, 'install') + + def run(self): + """run() + + Generate the instroot tree and prepare it for building images. + + """ + if not os.path.isdir(self.destdir): os.makedirs(self.destdir) # build a list of packages to install - self.packages = self._getPackageList() + self.packages = self.__getPackageList() # install the packages to the instroot - self._installPackages() + self.__installPackages() # scrub instroot - self._scrubInstRoot() + self.__scrubInstRoot() def __getPackageList(self): packages = set()