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 8A125138359 for ; Thu, 29 Oct 2020 16:16:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DCBBFE099B; Thu, 29 Oct 2020 16:16:45 +0000 (UTC) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) (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 D60A9E099B for ; Thu, 29 Oct 2020 16:16:45 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id b69so2394260qkg.8 for ; Thu, 29 Oct 2020 09:16:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AyJ3ODxGOXWg/zAcZIwBNmqo2VwxLuxDVbrPqQJr96k=; b=DNFL3HWNcRXumBzrUrXVx/1jXsWwTH/a7iHDHq9yWbEcapLAdGtkZyTdXbbJSd/Xt8 J/oFbB6W1KhxePCMOjXtRaHWSmC3uuNZDplZbcdcCbrxPGzS2oNiHSqj+iLZ8cjO3TY3 7GOWbhj2Pn0RQnZ2suCLe1vH5ZV03GzPf6x8aECXVNUvgR90l7ilU8G5J+yXsJrenFoQ 8I0z7pBm3Idfd+FYZak5Hio2ql+1Vhq5F1aDSYu59rBcVouldB4egoh0bwUCu2qUr4Qk KMT0Ukmvx87NSjyGvybJKbW+96JLsCjaSHCYSNQKr6CleB+X/MmZzzCzrgd2OG6Lh2aY TpZg== X-Gm-Message-State: AOAM530Fcqon6Diac7ahJBt+0fOCjziufY86/ESMMAwWjapqD3N4zZqR Htw4jfAfCJoZ8V8TIMjZ5hCBNbiy1Hw= X-Google-Smtp-Source: ABdhPJy4Z50ci4dSWXv/U2PiuoUo6ZK+gu/ZeVUCrDvAt17EIVzfOLusHAaog2GJxa7IOh/GpWt2Ww== X-Received: by 2002:a05:620a:4141:: with SMTP id k1mr4591000qko.60.1603988204799; Thu, 29 Oct 2020 09:16:44 -0700 (PDT) Received: from localhost (2606-a000-131c-10bb-0000-0000-0000-1fc3.inf6.spectrum.com. [2606:a000:131c:10bb::1fc3]) by smtp.gmail.com with ESMTPSA id x50sm1342039qth.30.2020.10.29.09.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Oct 2020 09:16:43 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 05/12] catalyst: Use .extend() and .append() for action_sequence Date: Thu, 29 Oct 2020 12:16:25 -0400 Message-Id: <20201029161632.146732-5-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201029161632.146732-1-mattst88@gentoo.org> References: <20201029161632.146732-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 4de7905c-9b43-4ec2-a815-f6f1b85b781c X-Archives-Hash: b0dd1d9b5d27ba14356bf416978bae5e Ensures that we don't overwrite and lose some settings. Signed-off-by: Matt Turner --- 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