From 9369a6fa6f553f20c9658a930399cc77051b3294 Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Thu, 21 Apr 2005 14:45:09 +0000 Subject: [PATCH] only append livecd-tools to the livecd-stage1 target package list and move a check out of the way so command line and spec files can co-exist git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@621 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 8 +++++++- catalyst | 5 ++++- modules/catalyst_support.py | 5 +---- modules/generic_stage_target.py | 5 ++--- modules/livecd_stage1_target.py | 8 +++++++- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6d8f46c..ad457ff0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.233 2005/04/21 14:40:43 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.234 2005/04/21 14:45:09 rocket Exp $ + + 21 Apr 2005; Eric Edgar catalyst, + modules/catalyst_support.py, modules/generic_stage_target.py, + modules/livecd_stage1_target.py: + only append livecd-tools to the livecd-stage1 target package list and move a + check out of the way so command line and spec files can co-exist 21 Apr 2005; Eric Edgar modules/generic_stage_target.py: diff --git a/catalyst b/catalyst index 1ad4924f..95955e17 100755 --- a/catalyst +++ b/catalyst @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.72 2005/04/07 23:02:20 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.73 2005/04/21 14:45:09 rocket Exp $ # Maintained in full by: # Eric Edgar @@ -303,6 +303,9 @@ if __name__ == "__main__": if mycmdline: addlargs.update(do_cli(mycmdline)) + if not addlargs.has_key("target"): + raise CatalystError, "Required value \"target\" not specified." + # everything is setup, so the build is a go try: build_target(addlargs, targetmap) diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 2c27afa2..c20e298e 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.39 2005/04/21 14:23:11 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.40 2005/04/21 14:45:09 rocket Exp $ import sys,string,os,types,re,signal,traceback,md5 # a function to turn a string of non-printable characters into a string of @@ -332,9 +332,6 @@ def arg_parse(cmdline): else: mydict[foo[0]]=foo[1] - if not mydict.has_key("target"): - raise CatalystError, "Required value \"target\" not specified." - # if all is well, we should return (we should have bailed before here if not) return mydict diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 2587228c..1fa6f604 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.34 2005/04/21 14:31:51 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.35 2005/04/21 14:45:09 rocket Exp $ """ This class does all of the chroot setup, copying of files, etc. It is @@ -343,8 +343,7 @@ class generic_stage_target(generic_target): pass def set_packages(self): - if self.settings.has_key("iso"): - self.settings[self.settings["spec_prefix"]+"/packages"].append("livecd-tools") + pass def set_root_path(self): # ROOT= variable for emerges diff --git a/modules/livecd_stage1_target.py b/modules/livecd_stage1_target.py index fee5576e..eb83f6f8 100644 --- a/modules/livecd_stage1_target.py +++ b/modules/livecd_stage1_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.10 2005/04/21 14:23:11 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.11 2005/04/21 14:45:09 rocket Exp $ """ Builder class for LiveCD stage1. @@ -23,6 +23,12 @@ class livecd_stage1_target(generic_stage_target): def set_spec_prefix(self): self.settings["spec_prefix"]="livecd" + + def set_packages(self): + generic_stage_target.set_packages(self) + if self.settings.has_key(self.settings["spec_prefix"]+"/packages"): + self.settings[self.settings["spec_prefix"]+"/packages"].append("livecd-tools") + def register(foo): foo.update({"livecd-stage1":livecd_stage1_target}) return foo -- 2.26.2