From 18bd21fcb1bf3372b83d97d6c2b564b7dda136b0 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Tue, 10 Apr 2007 21:37:35 +0000 Subject: [PATCH] Added a patch from Mike Frysinger for bug #173740 to cause catalyst to export boolean variables as well as string-based variables. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1228 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 6 ++++++ modules/generic_stage_target.py | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index afc9d3e3..48fa771c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 # $Id: $ + 10 Apr 2007; Chris Gianelloni + modules/generic_stage_target.py: + Added a patch from Mike Frysinger for bug #173740 to + cause catalyst to export boolean variables as well as string-based + variables. + 10 Apr 2007; Chris Gianelloni modules/generic_stage_target.py: Fixing check for invalid subarch to not filter too much. Fix from Mike diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 97ce88fe..59dd37fa 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -1057,8 +1057,7 @@ class generic_stage_target(generic_target): # fixed. We need this to use the os.system() call since we can't # specify our own environ: for x in self.settings.keys(): - # "/" is replaced with "_", "-" is replaced with "_", and "." is - # replaced with "_" + # sanitize var names by doing "s|/-.|_|g" varname="clst_"+string.replace(x,"/","_") varname=string.replace(varname,"-","_") varname=string.replace(varname,".","_") @@ -1069,6 +1068,11 @@ class generic_stage_target(generic_target): elif type(self.settings[x])==types.ListType: #os.environ[varname]=string.join(self.settings[x]) self.env[varname]=string.join(self.settings[x]) + elif type(self.settings[x])==types.BooleanType: + if self.settings[x]: + self.env[varname]="true" + else: + self.env[varname]="false" if self.settings.has_key("makeopts"): self.env["MAKEOPTS"]=self.settings["makeopts"] -- 2.26.2