From 49356fc479c7aace633d8ab7b5f43d5f6bdf7c1a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 30 Apr 2009 04:35:53 +0000 Subject: [PATCH] Exclude 'backupenv' from config.configlist and lookuplist since it doesn't make size to have it in there when configdict['env'] already serves that purpose. This allows values to be temporarily removed from configdict['env'] and have them not appear in the environment until reset() is called to restore those values from the backupenv. svn path=/main/trunk/; revision=13415 --- pym/portage/__init__.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index d852efe78..74ba6e1cc 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -1257,19 +1257,19 @@ class config(object): self.mycpv = copy.deepcopy(clone.mycpv) self._setcpv_args_hash = copy.deepcopy(clone._setcpv_args_hash) - self.configlist = copy.deepcopy(clone.configlist) + self.configdict = copy.deepcopy(clone.configdict) + self.configlist = [ + self.configdict['env.d'], + self.configdict['pkginternal'], + self.configdict['globals'], + self.configdict['defaults'], + self.configdict['conf'], + self.configdict['pkg'], + self.configdict['auto'], + self.configdict['env'], + ] self.lookuplist = self.configlist[:] self.lookuplist.reverse() - self.configdict = { - "env.d": self.configlist[0], - "pkginternal": self.configlist[1], - "globals": self.configlist[2], - "defaults": self.configlist[3], - "conf": self.configlist[4], - "pkg": self.configlist[5], - "auto": self.configlist[6], - "backupenv": self.configlist[7], - "env": self.configlist[8] } self._use_expand_dict = copy.deepcopy(clone._use_expand_dict) self.profiles = copy.deepcopy(clone.profiles) self.backupenv = self.configdict["backupenv"] @@ -1579,8 +1579,7 @@ class config(object): self.configlist.append({}) self.configdict["auto"]=self.configlist[-1] - self.configlist.append(self.backupenv) # XXX Why though? - self.configdict["backupenv"]=self.configlist[-1] + self.configdict["backupenv"] = self.backupenv # Don't allow the user to override certain variables in the env for k in profile_only_variables: -- 2.26.2