From 8f205bbae0d05530c0302bc4cd18c1c03ad4046d Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Tue, 10 Apr 2007 21:33:58 +0000 Subject: [PATCH] Fixing check for invalid subarch to not filter too much. Fix from Mike Frysinger for bug #173532. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1227 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 5 +++++ modules/generic_stage_target.py | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 107fd521..afc9d3e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 10 Apr 2007; Chris Gianelloni + modules/generic_stage_target.py: + Fixing check for invalid subarch to not filter too much. Fix from Mike + Frysinger for bug #173532. + 10 Apr 2007; Chris Gianelloni arch/s390.py: Added s390x (64-bit) support via a patch from Mike Frysinger for bug #173002. diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 8b0f6a1a..97ce88fe 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -28,20 +28,21 @@ class generic_stage_target(generic_target): # machinemap from this file and split up its contents amongst the various # arch/foo.py files. # - # When register() is called on each module in the arch/ dir, it now returns - # a tuple instead of acting on the subarchmap dict that is passed to it. - # The tuple contains the values that were previously added to subarchmap - # as well as a new list of CHOSTs that go along with that arch. This allows - # us to build machinemap on the fly based on the keys in subarchmap and - # the values of the 2nd list returned (tmpmachinemap). + # When register() is called on each module in the arch/ dir, it now + # returns a tuple instead of acting on the subarchmap dict that is + # passed to it. The tuple contains the values that were previously + # added to subarchmap as well as a new list of CHOSTs that go along + # with that arch. This allows us to build machinemap on the fly based + # on the keys in subarchmap and the values of the 2nd list returned + # (tmpmachinemap). # # Also, after talking with vapier. I have a slightly better idea of what # certain variables are used for and what they should be set to. Neither # 'buildarch' or 'hostarch' are used directly, so their value doesn't # really matter. They are just compared to determine if we are # cross-compiling. Because of this, they are just set to the name of the - # module in arch/ that the subarch is part of to make things simpler. The - # entire build process is still based off of 'subarch' like it was + # module in arch/ that the subarch is part of to make things simpler. + # The entire build process is still based off of 'subarch' like it was # previously. -agaffney self.archmap = {} @@ -89,7 +90,7 @@ class generic_stage_target(generic_target): # Call arch constructor, pass our settings try: self.arch=self.subarchmap[self.settings["subarch"]](self.settings) - except: + except KeyError: print "Invalid subarch: "+self.settings["subarch"] print "Choose one of the following:", for x in self.subarchmap: -- 2.26.2