summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-27 04:41:56 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-27 04:41:56 +0000
commit65d77297cf1fa8fbf28c26384ef98a7bfae9ec85 (patch)
tree157319754ddb2ca1186e06a2bd7fbf2a2e655251
parente9ccae9a0d36c5e0507dc09a0c19061331f71c0a (diff)
downloadportage-65d77297cf1fa8fbf28c26384ef98a7bfae9ec85.tar.gz
portage-65d77297cf1fa8fbf28c26384ef98a7bfae9ec85.tar.bz2
portage-65d77297cf1fa8fbf28c26384ef98a7bfae9ec85.zip
Make depgraph._select_atoms() more flexible by allowing
the repositories to be passed in as a parameter. svn path=/main/trunk/; revision=8319
-rw-r--r--pym/_emerge/__init__.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 9c4927474..5cac1f528 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1510,8 +1510,6 @@ class depgraph(object):
print "Priority:", dep_priority
vardb = self.roots[dep_root].trees["vartree"].dbapi
try:
- self._populate_filtered_repo(dep_root, dep_string,
- myuse=myuse, strict=strict)
selected_atoms = self._select_atoms(dep_root,
dep_string, myuse=myuse, strict=strict)
except portage.exception.InvalidDependString, e:
@@ -1935,16 +1933,22 @@ class depgraph(object):
if atom_populated:
break
- def _select_atoms(self, root, depstring, myuse=None, strict=True):
- """This will raise InvalidDependString if necessary."""
+ def _select_atoms(self, root, depstring, myuse=None, strict=True,
+ trees=None):
+ """This will raise InvalidDependString if necessary. If trees is
+ None then self._filtered_trees is used."""
pkgsettings = self.pkgsettings[root]
+ if trees is None:
+ trees = self._filtered_trees
+ self._populate_filtered_repo(root, depstring,
+ myuse=myuse, strict=strict)
if True:
try:
if not strict:
portage.dep._dep_check_strict = False
mycheck = portage.dep_check(depstring, None,
pkgsettings, myuse=myuse,
- myroot=root, trees=self._filtered_trees)
+ myroot=root, trees=trees)
finally:
portage.dep._dep_check_strict = True
if not mycheck[0]: