From 08d628908865f6624db4ed6489aa3ea6cf018be0 Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Tue, 20 Dec 2005 20:53:49 +0000 Subject: [PATCH] Disable reading of CHOST/CFLAGS/CXXFLAGS/LDFLAGS from the environment. Allow stage1 to be overridden again. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@990 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 7 ++++++- modules/stage1_target.py | 27 ++++++++++++++++++++++++++- modules/stage2_target.py | 18 +++++++++--------- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b8111a3..d47877cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.477 2005/12/20 20:30:47 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.478 2005/12/20 20:53:49 rocket Exp $ + + 20 Dec 2005; Eric Edgar modules/stage1_target.py, + modules/stage2_target.py: + Disable reading of CHOST/CFLAGS/CXXFLAGS/LDFLAGS from the environment. Allow + stage1 to be overridden again. 20 Dec 2005; Chris Gianelloni targets/stage1/stage1-controller.sh: diff --git a/modules/stage1_target.py b/modules/stage1_target.py index f98099f7..cb1c9044 100644 --- a/modules/stage1_target.py +++ b/modules/stage1_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.19 2005/12/16 14:42:07 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.20 2005/12/20 20:53:49 rocket Exp $ """ Builder class for a stage1 installation tarball build. @@ -28,6 +28,31 @@ class stage1_target(generic_stage_target): generic_stage_target.set_cleanables(self) self.settings["cleanables"].extend(["/usr/share/gettext","/usr/lib/python2.2/test", "/usr/lib/python2.2/encodings","/usr/lib/python2.2/email", "/usr/lib/python2.2/lib-tk","/usr/share/zoneinfo"]) + def override_chost(self): + #if os.environ.has_key("CHOST"): + # self.settings["CHOST"] = os.environ["CHOST"] + if self.settings.has_key("chost"): + self.settings["CHOST"]=list_to_string(self.settings["chost"]) + + def override_cflags(self): + #if os.environ.has_key("CFLAGS"): + # self.settings["CFLAGS"] = os.environ["CFLAGS"] + if self.settings.has_key("cflags"): + self.settings["CFLAGS"]=list_to_string(self.settings["cflags"]) + + def override_cxxflags(self): + #if os.environ.has_key("CXXFLAGS"): + # self.settings["CXXFLAGS"] = os.environ["CXXFLAGS"] + if self.settings.has_key("cxxflags"): + self.settings["CXXFLAGS"]=list_to_string(self.settings["cxxflags"]) + + def override_ldflags(self): + #if os.environ.has_key("LDFLAGS"): + # self.settings["LDFLAGS"] = os.environ["LDFLAGS"] + if self.settings.has_key("ldflags"): + self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"]) + + def set_portage_overlay(self): generic_stage_target.set_portage_overlay(self) if self.settings.has_key("portage_overlay"): diff --git a/modules/stage2_target.py b/modules/stage2_target.py index e6cf5e6d..e33e8dd4 100644 --- a/modules/stage2_target.py +++ b/modules/stage2_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage2_target.py,v 1.11 2005/12/19 20:53:13 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage2_target.py,v 1.12 2005/12/20 20:53:49 rocket Exp $ """ Builder class for a stage2 installation tarball build. @@ -33,26 +33,26 @@ class stage2_target(generic_stage_target): if os.path.exists(self.settings["source_path"]): self.settings["source_path_hash"]=generate_hash(self.settings["source_path"]) def override_chost(self): - if os.environ.has_key("CHOST"): - self.settings["CHOST"] = os.environ["CHOST"] + #if os.environ.has_key("CHOST"): + # self.settings["CHOST"] = os.environ["CHOST"] if self.settings.has_key("chost"): self.settings["CHOST"]=list_to_string(self.settings["chost"]) def override_cflags(self): - if os.environ.has_key("CFLAGS"): - self.settings["CFLAGS"] = os.environ["CFLAGS"] + #if os.environ.has_key("CFLAGS"): + # self.settings["CFLAGS"] = os.environ["CFLAGS"] if self.settings.has_key("cflags"): self.settings["CFLAGS"]=list_to_string(self.settings["cflags"]) def override_cxxflags(self): - if os.environ.has_key("CXXFLAGS"): - self.settings["CXXFLAGS"] = os.environ["CXXFLAGS"] + #if os.environ.has_key("CXXFLAGS"): + # self.settings["CXXFLAGS"] = os.environ["CXXFLAGS"] if self.settings.has_key("cxxflags"): self.settings["CXXFLAGS"]=list_to_string(self.settings["cxxflags"]) def override_ldflags(self): - if os.environ.has_key("LDFLAGS"): - self.settings["LDFLAGS"] = os.environ["LDFLAGS"] + #if os.environ.has_key("LDFLAGS"): + # self.settings["LDFLAGS"] = os.environ["LDFLAGS"] if self.settings.has_key("ldflags"): self.settings["LDFLAGS"]=list_to_string(self.settings["ldflags"]) -- 2.26.2