commit: 2c28062446246e246c992ea7084a3950b1337827 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> AuthorDate: Thu Oct 29 00:32:34 2020 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> CommitDate: Fri Oct 30 22:40:52 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=2c280624
catalyst: Use .extend() and .append() for action_sequence Ensures that we don't overwrite and lose some settings. Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> catalyst/base/stagebase.py | 6 +++--- catalyst/targets/embedded.py | 4 ++-- catalyst/targets/livecd_stage1.py | 4 ++-- catalyst/targets/livecd_stage2.py | 8 ++++---- catalyst/targets/netboot.py | 4 ++-- catalyst/targets/stage4.py | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 801df2fb..46b7c59c 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -478,13 +478,13 @@ class StageBase(TargetBase, ClearBase, GenBase): Or it calls the normal set_action_sequence() for the target stage. """ if "purgeonly" in self.settings["options"]: - self.action_sequence = ["remove_chroot"] + self.action_sequence.append("remove_chroot") return self.set_action_sequence() def set_action_sequence(self): """Set basic stage1, 2, 3 action sequences""" - self.action_sequence = [ + self.action_sequence.extend([ "unpack", "setup_confdir", "portage_overlay", @@ -495,7 +495,7 @@ class StageBase(TargetBase, ClearBase, GenBase): "preclean", "unbind", "clean", - ] + ]) self.set_completion_action_sequences() def set_completion_action_sequences(self): diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py index 3899cf1b..75eb68e4 100644 --- a/catalyst/targets/embedded.py +++ b/catalyst/targets/embedded.py @@ -41,7 +41,7 @@ class embedded(StageBase): StageBase.__init__(self, spec, addlargs) def set_action_sequence(self): - self.action_sequence = [ + self.action_sequence.extend([ "unpack", "config_profile_link", "setup_confdir", @@ -60,7 +60,7 @@ class embedded(StageBase): "clean", "capture", "clear_autoresume", - ] + ]) def set_stage_path(self): self.settings["stage_path"] = normpath( diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py index b8c26cb1..9dbfa506 100644 --- a/catalyst/targets/livecd_stage1.py +++ b/catalyst/targets/livecd_stage1.py @@ -23,7 +23,7 @@ class livecd_stage1(StageBase): StageBase.__init__(self, spec, addlargs) def set_action_sequence(self): - self.action_sequence = [ + self.action_sequence.extend([ "unpack", "config_profile_link", "setup_confdir", @@ -34,7 +34,7 @@ class livecd_stage1(StageBase): "build_packages", "unbind", "clean", - ] + ]) self.set_completion_action_sequences() def set_spec_prefix(self): diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py index cac16b6e..c9b5ce08 100644 --- a/catalyst/targets/livecd_stage2.py +++ b/catalyst/targets/livecd_stage2.py @@ -87,7 +87,7 @@ class livecd_stage2(StageBase): print_traceback=True) def set_action_sequence(self): - self.action_sequence = [ + self.action_sequence.extend([ "unpack", "config_profile_link", "setup_confdir", @@ -97,9 +97,9 @@ class livecd_stage2(StageBase): "setup_environment", "run_local", "build_kernel" - ] + ]) if "fetch" not in self.settings["options"]: - self.action_sequence += [ + self.action_sequence.extend([ "bootloader", "preclean", "livecd_update", @@ -114,5 +114,5 @@ class livecd_stage2(StageBase): "target_setup", "setup_overlay", "create_iso", - ] + ]) self.action_sequence.append("clear_autoresume") diff --git a/catalyst/targets/netboot.py b/catalyst/targets/netboot.py index 61583f0d..e5c6d43c 100644 --- a/catalyst/targets/netboot.py +++ b/catalyst/targets/netboot.py @@ -160,7 +160,7 @@ class netboot(StageBase): self.resume.enable("empty") def set_action_sequence(self): - self.action_sequence = [ + self.action_sequence.extend([ "unpack", "config_profile_link", "setup_confdir", @@ -179,4 +179,4 @@ class netboot(StageBase): "unbind", "clean", "clear_autoresume", - ] + ]) diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py index eef24a73..bb20be79 100644 --- a/catalyst/targets/stage4.py +++ b/catalyst/targets/stage4.py @@ -39,7 +39,7 @@ class stage4(StageBase): self.settings["cleanables"].remove('/etc/resolv.conf') def set_action_sequence(self): - self.action_sequence = [ + self.action_sequence.extend([ "unpack", "config_profile_link", "setup_confdir", @@ -59,5 +59,5 @@ class stage4(StageBase): "remove", "empty", "clean", - ] + ]) self.set_completion_action_sequences()