aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2015-12-15 09:00:48 -0800
committerBrian Dolbec <dolsen@gentoo.org>2015-12-15 09:08:38 -0800
commit159c6b3919f72a41cf60b3ecbb2ce5d07b1b18f2 (patch)
tree60caed452cb6677eb9cf272979f51381dbe695fe
parenttargets/livecd_stage1.py: Remove the duplicated set_target_path() (diff)
downloadcatalyst-159c6b3919f72a41cf60b3ecbb2ce5d07b1b18f2.tar.gz
catalyst-159c6b3919f72a41cf60b3ecbb2ce5d07b1b18f2.tar.bz2
catalyst-159c6b3919f72a41cf60b3ecbb2ce5d07b1b18f2.zip
Split the stagebase's set_action_sequence()
Split off the configurable portions of completion sequences. Re-use that new function in other stages.
-rw-r--r--catalyst/base/stagebase.py3
-rw-r--r--catalyst/targets/livecd_stage1.py3
-rw-r--r--catalyst/targets/stage4.py7
3 files changed, 6 insertions, 7 deletions
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 92f300ee..a8802497 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -506,6 +506,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
"setup_confdir","portage_overlay",\
"base_dirs","bind","chroot_setup","setup_environment",\
"run_local","preclean","unbind","clean"]
+ self.set_completion_action_sequences()
+
+ def set_completion_action_sequences(self):
if "fetch" not in self.settings["options"]:
self.settings["action_sequence"].append("capture")
if "keepwork" in self.settings["options"]:
diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index aa234b28..60ef3884 100644
--- a/catalyst/targets/livecd_stage1.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -27,7 +27,8 @@ class livecd_stage1(StageBase):
self.settings["action_sequence"]=["unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","portage_overlay",\
"bind","chroot_setup","setup_environment","build_packages",\
- "unbind", "clean","clear_autoresume"]
+ "unbind", "clean"]
+ self.set_completion_action_sequences()
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index 857976bd..fdc84653 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -30,9 +30,4 @@ class stage4(StageBase):
"build_kernel","bootloader","root_overlay","fsscript",\
"preclean","rcupdate","unmerge","unbind","remove","empty",\
"clean"]
-
-# if "TARBALL" in self.settings or \
-# "fetch" not in self.settings['options']:
- if "fetch" not in self.settings['options']:
- self.settings["action_sequence"].append("capture")
- self.settings["action_sequence"].append("clear_autoresume")
+ self.set_completion_action_sequences()