aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-26 10:12:25 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-26 10:12:25 -0700
commitebfcfc636536a3d6fcaa0c0d8de27cac391b5b3c (patch)
treec5725977ca1f08036de078f2ca5b4b0c60ef34b5 /pym/portage/dbapi/bintree.py
parentDisable 'unused local USE-description' check if there are any invalids. (diff)
downloadportage-ebfcfc636536a3d6fcaa0c0d8de27cac391b5b3c.tar.gz
portage-ebfcfc636536a3d6fcaa0c0d8de27cac391b5b3c.tar.bz2
portage-ebfcfc636536a3d6fcaa0c0d8de27cac391b5b3c.zip
Make use_reduce() call Atom.evaluate_conditionals() when matchall is False,
and pass token_class=Atom in use_reduce() calls so that external Atom.evaluate_conditionals() calls can be eliminated.
Diffstat (limited to 'pym/portage/dbapi/bintree.py')
-rw-r--r--pym/portage/dbapi/bintree.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 9b1535e49..b4e240783 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -18,7 +18,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
from portage.cache.mappings import slot_dict_class
from portage.dbapi.virtual import fakedbapi
-from portage.dep import use_reduce, paren_enclose
+from portage.dep import Atom, use_reduce, paren_enclose
from portage.exception import InvalidPackageName, \
PermissionDenied, PortageException
from portage.localization import _
@@ -1087,22 +1087,12 @@ class binarytree(object):
for k in self._pkgindex_use_evaluated_keys:
try:
deps = metadata[k]
- deps = use_reduce(deps, uselist=raw_use)
+ deps = use_reduce(deps, uselist=raw_use, token_class=Atom)
deps = paren_enclose(deps)
except portage.exception.InvalidDependString as e:
writemsg("%s: %s\n" % (k, str(e)),
noiselevel=-1)
raise
- if k in _vdb_use_conditional_atoms:
- v_split = []
- for x in deps.split():
- try:
- x = portage.dep.Atom(x)
- except portage.exception.InvalidAtom:
- v_split.append(x)
- else:
- v_split.append(str(x.evaluate_conditionals(raw_use)))
- deps = ' '.join(v_split)
metadata[k] = deps
def exists_specific(self, cpv):