From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E3B6B138359 for ; Thu, 29 Oct 2020 16:04:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 40177E094A; Thu, 29 Oct 2020 16:04:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 130C5E094F for ; Thu, 29 Oct 2020 16:04:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0E94D340940 for ; Thu, 29 Oct 2020 16:04:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B30413C3 for ; Thu, 29 Oct 2020 16:04:45 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1603987421.4cac82c0678ae882fb2371b9499d15eff2ecf140.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/base/, catalyst/targets/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py catalyst/targets/embedded.py catalyst/targets/livecd_stage1.py catalyst/targets/livecd_stage2.py catalyst/targets/netboot.py catalyst/targets/stage4.py X-VCS-Directories: catalyst/targets/ catalyst/base/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 4cac82c0678ae882fb2371b9499d15eff2ecf140 X-VCS-Branch: pending/mattst88 Date: Thu, 29 Oct 2020 16:04:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 74a87e91-1418-4bbe-88d1-39ed5b808cde X-Archives-Hash: 638ae2de80303e9170a11d256a83cb43 commit: 4cac82c0678ae882fb2371b9499d15eff2ecf140 Author: Matt Turner gentoo org> AuthorDate: Thu Oct 29 00:32:34 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Thu Oct 29 16:03:41 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4cac82c0 catalyst: Use .extend() and .append() for action_sequence Ensures that we don't overwrite and lose some settings. Signed-off-by: Matt Turner 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 bee8b57a..5f40d3e9 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()