From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-catalyst] [PATCH 05/12] catalyst: Use .extend() and .append() for action_sequence
Date: Thu, 29 Oct 2020 12:16:25 -0400 [thread overview]
Message-ID: <20201029161632.146732-5-mattst88@gentoo.org> (raw)
In-Reply-To: <20201029161632.146732-1-mattst88@gentoo.org>
Ensures that we don't overwrite and lose some settings.
Signed-off-by: Matt Turner <mattst88@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()
--
2.26.2
next prev parent reply other threads:[~2020-10-29 16:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-29 16:16 [gentoo-catalyst] [PATCH 01/12] catalyst: Replace pathcompare() Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 02/12] catalyst: Rewrite ismount() to use libmount Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 03/12] catalyst: Use libmount for handling mounts Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 04/12] catalyst: Move action_sequence out of self.settings[] Matt Turner
2020-10-29 16:16 ` Matt Turner [this message]
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 06/12] catalyst: Split action_sequence into prepare/build/finish Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 07/12] catalyst: Factor out run_sequence() Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 08/12] catalyst: Add and use namespace context manager Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 09/12] catalyst: Run the build sequence in new mount namespace Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 10/12] catalyst: Remove kill_support_pids() Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 11/12] catalyst: Remove mount_safety_check() Matt Turner
2020-10-29 16:16 ` [gentoo-catalyst] [PATCH 12/12] catalyst: Drop unbind() Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201029161632.146732-5-mattst88@gentoo.org \
--to=mattst88@gentoo.org \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox