From: Zac Medico Date: Thu, 30 Apr 2009 07:31:09 +0000 (-0000) Subject: Exclude 'backupenv' from config.configlist and lookuplist since it doesn't X-Git-Tag: v2.1.6.12~18 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d2df56958f6744cc9932d6c345e96c3a2404a9c0;p=portage.git 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. (trunk r13415) svn path=/main/branches/2.1.6/; revision=13555 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 5d049990b..0f0727bfa 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: