summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-06-28 20:37:50 +0000
committerZac Medico <zmedico@gentoo.org>2009-06-28 20:37:50 +0000
commit63cf7acf21bd855ddb693a1686b4c3ec9fff696c (patch)
tree9558f15e46c4fc6d79ddb81410323f67efeb00bd /pym
parent58ba036b77ce5b2250e54a4d4742d1c7c08efb4b (diff)
downloadportage-63cf7acf21bd855ddb693a1686b4c3ec9fff696c.tar.gz
portage-63cf7acf21bd855ddb693a1686b4c3ec9fff696c.tar.bz2
portage-63cf7acf21bd855ddb693a1686b4c3ec9fff696c.zip
Fix Package.metadata USE conditional evaluation so that it's delayed until
after config.setcpv() has calculated PORTAGE_USE. Thanks to Arfrever for reporting. svn path=/main/trunk/; revision=13729
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 41da40cf7..720bf0d4b 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2250,9 +2250,12 @@ class config(object):
if mydb:
if not hasattr(mydb, "aux_get"):
for k in aux_keys:
- v = mydb.get(k)
- if v is not None:
- pkg_configdict[k] = v
+ if k in mydb:
+ # Make these lazy, since __getitem__ triggers
+ # evaluation of USE conditionals which can't
+ # occur until PORTAGE_USE is calculated below.
+ pkg_configdict.addLazySingleton(k,
+ mydb.__getitem__, k)
else:
for k, v in izip(aux_keys, mydb.aux_get(self.mycpv, aux_keys)):
pkg_configdict[k] = v