1 |
commit: 159c6b3919f72a41cf60b3ecbb2ce5d07b1b18f2 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 15 17:00:48 2015 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 15 17:08:38 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=159c6b39 |
7 |
|
8 |
Split the stagebase's set_action_sequence() |
9 |
|
10 |
Split off the configurable portions of completion sequences. |
11 |
Re-use that new function in other stages. |
12 |
|
13 |
catalyst/base/stagebase.py | 3 +++ |
14 |
catalyst/targets/livecd_stage1.py | 3 ++- |
15 |
catalyst/targets/stage4.py | 7 +------ |
16 |
3 files changed, 6 insertions(+), 7 deletions(-) |
17 |
|
18 |
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py |
19 |
index 92f300e..a880249 100644 |
20 |
--- a/catalyst/base/stagebase.py |
21 |
+++ b/catalyst/base/stagebase.py |
22 |
@@ -506,6 +506,9 @@ class StageBase(TargetBase, ClearBase, GenBase): |
23 |
"setup_confdir","portage_overlay",\ |
24 |
"base_dirs","bind","chroot_setup","setup_environment",\ |
25 |
"run_local","preclean","unbind","clean"] |
26 |
+ self.set_completion_action_sequences() |
27 |
+ |
28 |
+ def set_completion_action_sequences(self): |
29 |
if "fetch" not in self.settings["options"]: |
30 |
self.settings["action_sequence"].append("capture") |
31 |
if "keepwork" in self.settings["options"]: |
32 |
|
33 |
diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py |
34 |
index aa234b2..60ef388 100644 |
35 |
--- a/catalyst/targets/livecd_stage1.py |
36 |
+++ b/catalyst/targets/livecd_stage1.py |
37 |
@@ -27,7 +27,8 @@ class livecd_stage1(StageBase): |
38 |
self.settings["action_sequence"]=["unpack","unpack_snapshot",\ |
39 |
"config_profile_link","setup_confdir","portage_overlay",\ |
40 |
"bind","chroot_setup","setup_environment","build_packages",\ |
41 |
- "unbind", "clean","clear_autoresume"] |
42 |
+ "unbind", "clean"] |
43 |
+ self.set_completion_action_sequences() |
44 |
|
45 |
def set_spec_prefix(self): |
46 |
self.settings["spec_prefix"]="livecd" |
47 |
|
48 |
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py |
49 |
index 857976b..fdc8465 100644 |
50 |
--- a/catalyst/targets/stage4.py |
51 |
+++ b/catalyst/targets/stage4.py |
52 |
@@ -30,9 +30,4 @@ class stage4(StageBase): |
53 |
"build_kernel","bootloader","root_overlay","fsscript",\ |
54 |
"preclean","rcupdate","unmerge","unbind","remove","empty",\ |
55 |
"clean"] |
56 |
- |
57 |
-# if "TARBALL" in self.settings or \ |
58 |
-# "fetch" not in self.settings['options']: |
59 |
- if "fetch" not in self.settings['options']: |
60 |
- self.settings["action_sequence"].append("capture") |
61 |
- self.settings["action_sequence"].append("clear_autoresume") |
62 |
+ self.set_completion_action_sequences() |