diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-02 19:02:46 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-02 19:02:46 +0000 |
commit | 50c060641f4a84020d0a37d88c3393c2dc4aa005 (patch) | |
tree | 5d8b3030739f032b9763e79fbe9f1aa5e2daa53c | |
parent | dca018ce6500736ac9af8faa7fefd2717ecabf7b (diff) | |
download | portage-50c060641f4a84020d0a37d88c3393c2dc4aa005.tar.gz portage-50c060641f4a84020d0a37d88c3393c2dc4aa005.tar.bz2 portage-50c060641f4a84020d0a37d88c3393c2dc4aa005.zip |
In depgraph._complete_graph(), use cached Package instances instead
of constructing new ones.
svn path=/main/trunk/; revision=10096
-rw-r--r-- | pym/_emerge/__init__.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index faa0a83e8..506255087 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -3094,7 +3094,7 @@ class depgraph(object): # that are initially satisfied. while self._unsatisfied_deps: dep = self._unsatisfied_deps.pop() - matches = vardb.match(dep.atom) + matches = vardb.match_pkgs(dep.atom) if not matches: # Initially unsatisfied. continue @@ -3102,12 +3102,7 @@ class depgraph(object): # Add the installed package to the graph so that it # will be appropriately reported as a slot collision # (possibly solvable via backtracking). - cpv = matches[-1] # highest match - metadata = dict(izip(self._mydbapi_keys, - vardb.aux_get(cpv, self._mydbapi_keys))) - pkg = Package(type_name="installed", root=root, - cpv=cpv, metadata=metadata, built=True, - installed=True) + pkg = matches[-1] # highest match if not self._add_pkg(pkg, dep.parent, priority=dep.priority, depth=dep.depth): return 0 |