Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13555 - main/branches/2.1.6/pym/portage
Date: Thu, 30 Apr 2009 07:31:11
Message-Id: E1LzQjd-0002TF-Na@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-30 07:31:09 +0000 (Thu, 30 Apr 2009)
3 New Revision: 13555
4
5 Modified:
6 main/branches/2.1.6/pym/portage/__init__.py
7 Log:
8 Exclude 'backupenv' from config.configlist and lookuplist since it doesn't
9 make size to have it in there when configdict['env'] already serves that
10 purpose. This allows values to be temporarily removed from configdict['env']
11 and have them not appear in the environment until reset() is called to restore
12 those values from the backupenv. (trunk r13415)
13
14 Modified: main/branches/2.1.6/pym/portage/__init__.py
15 ===================================================================
16 --- main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 07:30:56 UTC (rev 13554)
17 +++ main/branches/2.1.6/pym/portage/__init__.py 2009-04-30 07:31:09 UTC (rev 13555)
18 @@ -1257,19 +1257,19 @@
19 self.mycpv = copy.deepcopy(clone.mycpv)
20 self._setcpv_args_hash = copy.deepcopy(clone._setcpv_args_hash)
21
22 - self.configlist = copy.deepcopy(clone.configlist)
23 + self.configdict = copy.deepcopy(clone.configdict)
24 + self.configlist = [
25 + self.configdict['env.d'],
26 + self.configdict['pkginternal'],
27 + self.configdict['globals'],
28 + self.configdict['defaults'],
29 + self.configdict['conf'],
30 + self.configdict['pkg'],
31 + self.configdict['auto'],
32 + self.configdict['env'],
33 + ]
34 self.lookuplist = self.configlist[:]
35 self.lookuplist.reverse()
36 - self.configdict = {
37 - "env.d": self.configlist[0],
38 - "pkginternal": self.configlist[1],
39 - "globals": self.configlist[2],
40 - "defaults": self.configlist[3],
41 - "conf": self.configlist[4],
42 - "pkg": self.configlist[5],
43 - "auto": self.configlist[6],
44 - "backupenv": self.configlist[7],
45 - "env": self.configlist[8] }
46 self._use_expand_dict = copy.deepcopy(clone._use_expand_dict)
47 self.profiles = copy.deepcopy(clone.profiles)
48 self.backupenv = self.configdict["backupenv"]
49 @@ -1579,8 +1579,7 @@
50 self.configlist.append({})
51 self.configdict["auto"]=self.configlist[-1]
52
53 - self.configlist.append(self.backupenv) # XXX Why though?
54 - self.configdict["backupenv"]=self.configlist[-1]
55 + self.configdict["backupenv"] = self.backupenv
56
57 # Don't allow the user to override certain variables in the env
58 for k in profile_only_variables: