Fix _iter_match_pkgs installed multislot breakage
authorZac Medico <zmedico@gentoo.org>
Wed, 6 Oct 2010 06:50:28 +0000 (23:50 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 Oct 2010 23:32:40 +0000 (16:32 -0700)
pym/_emerge/depgraph.py
pym/portage/dep/__init__.py

index 7e99a24e896212169ff2ddb4f2cfc179d3756d1e..e9d68a18e9f9c5cb006e8523deefb3624f0e2b3c 100644 (file)
@@ -2488,6 +2488,7 @@ class depgraph(object):
                # Therefore, assume that such SLOT dependencies are already
                # satisfied rather than forcing a rebuild.
                installed = pkg_type == 'installed'
+               ignore_installed_slot = False
                if installed and not cpv_list and atom.slot:
                        for cpv in db.match(atom.cp):
                                slot_available = False
@@ -2507,14 +2508,10 @@ class depgraph(object):
                                        root_config, installed=installed)
                                # Remove the slot from the atom and verify that
                                # the package matches the resulting atom.
-                               atom_without_slot = portage.dep.remove_slot(atom)
-                               if atom.use:
-                                       atom_without_slot += str(atom.use)
-                               atom_without_slot = portage.dep.Atom(atom_without_slot)
                                if portage.match_from_list(
-                                       atom_without_slot, [inst_pkg]):
-                                       cpv_list = [inst_pkg.cpv]
-                               break
+                                       atom.without_slot, [inst_pkg]):
+                                       yield inst_pkg
+                                       return
 
                if cpv_list:
 
index 3d7c554c4c4631f7f5f6af37d1079e9569a481c3..268ebb6433c9a2702e6155dcb541ccd498dfecc5 100644 (file)
@@ -1119,6 +1119,13 @@ class Atom(_atom_base):
                return Atom(self.replace(_repo_separator + self.repo, '', 1),
                        allow_wildcard=True)
 
+       @property
+       def without_slot(self):
+               if self.slot is None:
+                       return self
+               return Atom(self.replace(_slot_separator + self.slot, '', 1),
+                       allow_repo=True, allow_wildcard=True)
+
        def __setattr__(self, name, value):
                raise AttributeError("Atom instances are immutable",
                        self.__class__, name, value)