From 33d4e323c20133dbbb9540a0a3bebdaf0121132f Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Tue, 23 Jan 2007 17:06:15 +0000 Subject: [PATCH] Fixed new cbuild code with another patch from Mike Frysinger to allow the usage of subarches. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1207 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 5 +++++ modules/generic_stage_target.py | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index beaa59ad..1a042a4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 23 Jan 2007; Chris Gianelloni + modules/generic_stage_target.py: + Fixed new cbuild code with another patch from Mike Frysinger + to allow the usage of subarches. + 09 Jan 2007; Chris Gianelloni arch/alpha.py, arch/amd64.py, arch/arm.py, arch/hppa.py, arch/ia64.py, arch/mips.py, arch/ppc.py, arch/ppc64.py, arch/s390.py, arch/sh.py, arch/sparc.py, diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 1bd15997..d70ee716 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -57,11 +57,14 @@ class generic_stage_target(generic_target): if self.settings.has_key("chost"): hostmachine = self.settings["chost"].split("-")[0] + if not machinemap.has_key(hostmachine): + raise CatalystError, "Unknown host machine type "+hostmachine + self.settings["hostarch"] = machinemap[hostmachine] else: - hostmachine = os.uname()[4] - if not machinemap.has_key(hostmachine): - raise CatalystError, "Unknown host machine type "+hostmachine - self.settings["hostarch"] = machinemap[hostmachine] + hostmachine = self.settings["subarch"] + if machinemap.has_key(hostmachine): + hostmachine = machinemap[hostmachine] + self.settings["hostarch"] = hostmachine if self.settings.has_key("cbuild"): buildmachine = self.settings["cbuild"].split("-")[0] else: -- 2.26.2