summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-29 00:32:27 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-29 00:32:27 +0000
commit783d816cbc5fbbcbbbecef0e815cfe3a4ae180e4 (patch)
tree6b729e31346e6e4da0a1c1e756d94b6951f6a588 /pym
parentSkip redundant Atom construction in select_package(). (diff)
downloadportage-multirepo-783d816cbc5fbbcbbbecef0e815cfe3a4ae180e4.tar.gz
portage-multirepo-783d816cbc5fbbcbbbecef0e815cfe3a4ae180e4.tar.bz2
portage-multirepo-783d816cbc5fbbcbbbecef0e815cfe3a4ae180e4.zip
Fix the code from bug #220341 so that it matches the atom against the
installed package, like it's supposed to. svn path=/main/trunk/; revision=10470
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index bbd35c27..c1b48768 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -3073,6 +3073,16 @@ class depgraph(object):
for pkg in matched_packages:
if not vardb.cpv_exists(pkg.cpv):
continue
+ inst_pkg = self._pkg_cache.get(
+ (pkg_type, root, pkg.cpv, "nomerge"))
+ if inst_pkg is None:
+ metadata = izip(self._mydbapi_keys,
+ vardb.aux_get(cpv, self._mydbapi_keys))
+ inst_pkg = Package(built=built, cpv=pkg.cpv,
+ installed=installed, metadata=metadata,
+ onlydeps=onlydeps, root_config=root_config,
+ type_name=pkg_type)
+ self._pkg_cache[inst_pkg] = inst_pkg
# Remove the slot from the atom and verify that
# the package matches the resulting atom.
atom_without_slot = portage.dep.remove_slot(atom)
@@ -3080,8 +3090,8 @@ class depgraph(object):
atom_without_slot += str(atom.use)
atom_without_slot = portage.dep.Atom(atom_without_slot)
if portage.match_from_list(
- atom_without_slot, [pkg]):
- cpv_list = [pkg.cpv]
+ atom_without_slot, [inst_pkg]):
+ cpv_list = [inst_pkg.cpv]
break
if not cpv_list: