From 79f2a8e6637d0763cff95791bd3a1e74dc7185e7 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Mon, 9 May 2011 19:06:25 -0400 Subject: [PATCH] __init__ treebuilder fixup: yes, we need to backup installtree --- src/pylorax/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 18d90e7e..9131a2b8 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -18,7 +18,7 @@ # # Red Hat Author(s): Martin Gracik # David Cantrell -# +# Will Woods # set up logging import logging @@ -274,7 +274,9 @@ class Lorax(BaseLoraxClass): discinfo = DiscInfo(self.product.release, self.arch.basearch) discinfo.write(joinpaths(self.outputdir, ".discinfo")) - # XXX do we need to backup installtree here? + logger.info("backing up installroot") + installroot = joinpaths(self.workdir, "installroot") + linktree(self.installtree.root, installroot) logger.info("getting list of not required packages") removepkgs = template.getdata("remove", mode="lines") @@ -291,7 +293,7 @@ class Lorax(BaseLoraxClass): logger.info("preparing to build output tree and boot images") treebuilder = TreeBuilder(self.product, self.arch, - self.installtree.root, self.outputdir) + installroot, self.outputdir) # TODO: different image styles may do this part differently logger.info("rebuilding initramfs images")