In dep_zapdeps preference selection, use package names instead of the real atoms...
authorZac Medico <zmedico@gentoo.org>
Wed, 27 Sep 2006 16:50:36 +0000 (16:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 27 Sep 2006 16:50:36 +0000 (16:50 -0000)
svn path=/main/trunk/; revision=4543

pym/portage.py

index fa307af36c4c1d14dcc9738b2770c25abf970071..8f5fec8973fafab8d286d669a6aea97a1e4d134d 100644 (file)
@@ -3419,8 +3419,11 @@ def dep_zapdeps(unreduced, reduced, myroot, use_binaries=0, trees=None,
                else:
                        atoms = [dep]
 
+               """ The package names rather than the exact atoms are used for an
+               initial rough match against installed packages.  More specific
+               preference selection is handled later via slot and version comparison."""
                all_installed = True
-               for atom in atoms:
+               for atom in set([dep_getkey(atom) for atom in atoms]):
                        if not vardb.match(atom):
                                all_installed = False
                                break
@@ -4805,7 +4808,6 @@ class portdbapi(dbapi):
                'input: "sys-apps/foo-1.0",["SLOT","DEPEND","HOMEPAGE"]'
                'return: ["0",">=sys-libs/bar-1.0","http://www.foo.com"] or raise KeyError if error'
                global auxdbkeys,auxdbkeylen
-
                cat,pkg = string.split(mycpv, "/", 1)
 
                myebuild, mylocation = self.findname2(mycpv, mytree)