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 A38D013835B for ; Mon, 18 Jan 2021 03:49:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7EDBEE086F; Mon, 18 Jan 2021 03:49:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 5A0B6E086F for ; Mon, 18 Jan 2021 03:49:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 01986340D90 for ; Mon, 18 Jan 2021 03:49:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7362B4A0 for ; Mon, 18 Jan 2021 03:49:54 +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: <1610941788.e8574605f16ec995dafef34004d92ea03c870399.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/targets/, catalyst/base/ 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/base/ catalyst/targets/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: e8574605f16ec995dafef34004d92ea03c870399 X-VCS-Branch: wip/mattst88 Date: Mon, 18 Jan 2021 03:49:54 +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: 7b11d793-74e3-4b4c-a3b7-cd345df12eec X-Archives-Hash: 4134c136d17b399f1d63fb43e873788e commit: e8574605f16ec995dafef34004d92ea03c870399 Author: Matt Turner gentoo org> AuthorDate: Mon Jan 18 03:20:41 2021 +0000 Commit: Matt Turner gentoo org> CommitDate: Mon Jan 18 03:49:48 2021 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e8574605 catalyst: Deduplicate the common build_sequence steps This will also provide a nice spot to add a function to all targets' build_sequence. Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 11 ++++++----- catalyst/targets/embedded.py | 3 --- catalyst/targets/livecd_stage1.py | 3 --- catalyst/targets/livecd_stage2.py | 3 --- catalyst/targets/netboot.py | 3 --- catalyst/targets/stage4.py | 3 --- 6 files changed, 6 insertions(+), 20 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index fa9f1f64..d3048d31 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -73,7 +73,11 @@ class StageBase(TargetBase, ClearBase, GenBase): self.setup_confdir, self.portage_overlay, ] - self.build_sequence = [] + self.build_sequence = [ + self.bind, + self.chroot_setup, + self.setup_environment, + ] self.finish_sequence = [] self.set_valid_build_kernel_vars(addlargs) @@ -480,16 +484,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.build_sequence.append(self.remove_chroot) + self.build_sequence = [self.remove_chroot] return self.set_action_sequence() def set_action_sequence(self): """Set basic stage1, 2, 3 action sequences""" self.build_sequence.extend([ - self.bind, - self.chroot_setup, - self.setup_environment, self.run_local, self.preclean, ]) diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py index 83b17ad2..b677b226 100644 --- a/catalyst/targets/embedded.py +++ b/catalyst/targets/embedded.py @@ -42,9 +42,6 @@ class embedded(StageBase): def set_action_sequence(self): self.build_sequence.extend([ - self.bind, - self.chroot_setup, - self.setup_environment, self.build_kernel, self.build_packages, self.root_overlay, diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py index 9fe95a00..dbfa54ed 100644 --- a/catalyst/targets/livecd_stage1.py +++ b/catalyst/targets/livecd_stage1.py @@ -24,9 +24,6 @@ class livecd_stage1(StageBase): def set_action_sequence(self): self.build_sequence.extend([ - self.bind, - self.chroot_setup, - self.setup_environment, self.build_packages, ]) self.finish_sequence.extend([ diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py index ab8f4a0e..e90e9f53 100644 --- a/catalyst/targets/livecd_stage2.py +++ b/catalyst/targets/livecd_stage2.py @@ -87,9 +87,6 @@ class livecd_stage2(StageBase): def set_action_sequence(self): self.build_sequence.extend([ - self.bind, - self.chroot_setup, - self.setup_environment, self.run_local, self.build_kernel ]) diff --git a/catalyst/targets/netboot.py b/catalyst/targets/netboot.py index cb5e7ae4..a2a9fcb3 100644 --- a/catalyst/targets/netboot.py +++ b/catalyst/targets/netboot.py @@ -159,9 +159,6 @@ class netboot(StageBase): def set_action_sequence(self): self.build_sequence.extend([ - self.bind, - self.chroot_setup, - self.setup_environment, self.build_packages, self.root_overlay, self.copy_files_to_image, diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py index 9e53f070..f8383f75 100644 --- a/catalyst/targets/stage4.py +++ b/catalyst/targets/stage4.py @@ -40,9 +40,6 @@ class stage4(StageBase): def set_action_sequence(self): self.build_sequence.extend([ - self.bind, - self.chroot_setup, - self.setup_environment, self.build_packages, self.build_kernel, self.bootloader,