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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BAB61158046 for ; Sun, 13 Oct 2024 20:33:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 12582E0858; Sun, 13 Oct 2024 20:33:54 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E9D4EE0858 for ; Sun, 13 Oct 2024 20:33:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1046F3430EC for ; Sun, 13 Oct 2024 20:33:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 387371E04 for ; Sun, 13 Oct 2024 20:33:50 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1728851435.6a33ab1cbe0e2a6b237a7dc1b4cb3184f145b8d2.dilfridge@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/targets/diskimage_stage1.py X-VCS-Directories: catalyst/targets/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 6a33ab1cbe0e2a6b237a7dc1b4cb3184f145b8d2 X-VCS-Branch: master Date: Sun, 13 Oct 2024 20:33:50 +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: 9f0759f2-2ef2-4f07-a940-efd75124e794 X-Archives-Hash: 2d2bb3bd6129f2c63e301a8b05c5e298 commit: 6a33ab1cbe0e2a6b237a7dc1b4cb3184f145b8d2 Author: Andreas K. Hüttel gentoo org> AuthorDate: Sun Oct 13 14:40:19 2024 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Sun Oct 13 20:30:35 2024 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6a33ab1c Clone livecd_stage1.py to diskimage_stage1.py, only cosmetic changes Signed-off-by: Andreas K. Hüttel gentoo.org> catalyst/targets/diskimage_stage1.py | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/catalyst/targets/diskimage_stage1.py b/catalyst/targets/diskimage_stage1.py new file mode 100644 index 00000000..9cbf81df --- /dev/null +++ b/catalyst/targets/diskimage_stage1.py @@ -0,0 +1,58 @@ +""" +Disk image stage1 target +""" +# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. + +from catalyst.support import normpath + +from catalyst.base.stagebase import StageBase + + +class diskimage_stage1(StageBase): + """ + Builder class for disk image stage1. + """ + required_values = frozenset([ + "diskimage/packages", + ]) + valid_values = required_values | frozenset([ + "diskimage/use", + ]) + + def __init__(self, spec, addlargs): + StageBase.__init__(self, spec, addlargs) + + def set_action_sequence(self): + self.build_sequence.extend([ + self.build_packages, + ]) + self.finish_sequence.extend([ + self.clean, + ]) + self.set_completion_action_sequences() + + def set_spec_prefix(self): + self.settings["spec_prefix"] = "diskimage" + + def set_catalyst_use(self): + StageBase.set_catalyst_use(self) + if "catalyst_use" in self.settings: + self.settings["catalyst_use"].append("diskimage") + else: + self.settings["catalyst_use"] = ["diskiage"] + + def set_packages(self): + StageBase.set_packages(self) + if self.settings["spec_prefix"]+"/packages" in self.settings: + if isinstance(self.settings[self.settings['spec_prefix']+'/packages'], str): + self.settings[self.settings["spec_prefix"]+"/packages"] = \ + self.settings[self.settings["spec_prefix"] + + "/packages"].split() + + def set_pkgcache_path(self): + if "pkgcache_path" in self.settings: + if not isinstance(self.settings['pkgcache_path'], str): + self.settings["pkgcache_path"] = normpath( + ' '.join(self.settings["pkgcache_path"])) + else: + StageBase.set_pkgcache_path(self)