commit:     8811c5d189038f092c5d11d5052a6cfadda8b903
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 23 04:26:01 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Dec 23 04:26:01 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8811c5d1

targets/livecd_stage2.py: Re-add a set_target_path method

The target path directory is needed to assemble the components which are needed 
from 
the build chroot.  It is from that location that the final iso is created.

 catalyst/targets/livecd_stage2.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/catalyst/targets/livecd_stage2.py 
b/catalyst/targets/livecd_stage2.py
index c42cd4c..df0073c 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -39,6 +39,20 @@ class livecd_stage2(StageBase):
        def set_spec_prefix(self):
                self.settings["spec_prefix"]="livecd"
 
+       def set_target_path(self):
+               '''Set the target path for the finished stage.
+
+               This method runs the StageBase.set_target_path mehtod,
+               and additionally creates a staging directory for assembling
+               the final components needed to produce the iso image.
+               '''
+               super(livecd_stage2, self).set_target_path()
+               if os.path.isdir(self.settings["target_path"]):
+                       cmd("rm -rf " + self.settings["target_path"],
+                               "Could not remove existing directory: " +
+                               self.settings["target_path"], env=self.env)
+               ensure_dirs(self.settings["target_path"])
+
        def run_local(self):
                # what modules do we want to blacklist?
                if "livecd/modblacklist" in self.settings:

Reply via email to