summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-10-04 18:45:45 -0700
committerZac Medico <zmedico@gentoo.org>2010-10-04 18:45:45 -0700
commit5508f6ac774d838353828a3890e15133bf65447f (patch)
tree54d8a83bf40946cb352b0f943cd6f35b5d53b1d5
parentae7adb16474e290ad675db2b1f97026c2babd280 (diff)
downloadportage-5508f6ac774d838353828a3890e15133bf65447f.tar.gz
portage-5508f6ac774d838353828a3890e15133bf65447f.tar.bz2
portage-5508f6ac774d838353828a3890e15133bf65447f.zip
Cache InternalPackageSet in _iter_match_pkgs().
-rw-r--r--pym/_emerge/depgraph.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index e65b942b1..d9d0ed7c3 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2508,6 +2508,8 @@ class depgraph(object):
break
if cpv_list:
+ atom_set = InternalPackageSet(initial_atoms=(atom,),
+ allow_repo=True, allow_wildcard=True)
if atom.repo is None and hasattr(db, "getRepositories"):
repo_list = db.getRepositories()
else:
@@ -2534,8 +2536,8 @@ class depgraph(object):
# Make sure that cpv from the current repo satisfies the atom.
# This might not be the case if there are several repos with
# the same cpv, but different metadata keys, like SLOT.
- if not InternalPackageSet(initial_atoms=(atom,), allow_repo=True,
- ).findAtomForPackage(pkg, modified_use=self._pkg_use_enabled(pkg)):
+ if not atom_set.findAtomForPackage(pkg,
+ modified_use=self._pkg_use_enabled(pkg)):
continue
yield pkg