From 1e374b3bf8e33a19ca55c4fc9c64f0eb021ead33 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 29 Jul 2006 18:20:13 +0000 Subject: Stack /etc/profile.env inside portage.config so that it doesn't stop variables in inappropriate places. See bug #51370. svn path=/main/trunk/; revision=4048 --- pym/portage.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'pym/portage.py') diff --git a/pym/portage.py b/pym/portage.py index c32cb62b2..b0c6b1102 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -810,8 +810,9 @@ class config: "conf": self.configlist[2], "pkg": self.configlist[3], "auto": self.configlist[4], - "backupenv": self.configlist[5], - "env": self.configlist[6] } + "env.d": self.configlist[5], + "backupenv": self.configlist[6], + "env": self.configlist[7] } self.profiles = copy.deepcopy(clone.profiles) self.backupenv = self.configdict["backupenv"] self.pusedict = copy.deepcopy(clone.pusedict) @@ -994,6 +995,9 @@ class config: self.configlist.append({}) self.configdict["auto"]=self.configlist[-1] + self.configlist.append({}) + self.configdict["env.d"] = self.configlist[-1] + self.configlist.append(self.backupenv) # XXX Why though? self.configdict["backupenv"]=self.configlist[-1] @@ -1383,6 +1387,14 @@ class config: else: self.already_in_regenerate = 1 + # We grab the latest profile.env here since it changes frequently. + self.configdict["env.d"].clear() + env_d = getconfig( + os.path.join(self["PORTAGE_CONFIGROOT"], "etc", "profile.env")) + if env_d: + # env_d will be None if profile.env doesn't exist. + self.configdict["env.d"].update(env_d) + if useonly: myincrementals=["USE"] else: -- cgit v1.2.3-1-g7c22