For bug #181551, support slot deps in package.keywords.
authorZac Medico <zmedico@gentoo.org>
Sun, 10 Jun 2007 19:28:31 +0000 (19:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 10 Jun 2007 19:28:31 +0000 (19:28 -0000)
svn path=/main/trunk/; revision=6790

pym/portage/dbapi/porttree.py

index 9a26e038e6ff3c0512929f4bedd8710dbaabce10..0f23ce70e9c3c61c965f163709820535ccf3dd89 100644 (file)
@@ -648,10 +648,10 @@ class portdbapi(dbapi):
 
                accept_keywords = self.mysettings["ACCEPT_KEYWORDS"].split()
                pkgdict = self.mysettings.pkeywordsdict
-               aux_keys = ["KEYWORDS", "LICENSE", "EAPI"]
+               aux_keys = ["KEYWORDS", "LICENSE", "EAPI", "SLOT"]
                for mycpv in mylist:
                        try:
-                               keys, licenses, eapi = self.aux_get(mycpv, aux_keys)
+                               keys, licenses, eapi, slot = self.aux_get(mycpv, aux_keys)
                        except KeyError:
                                continue
                        except PortageException, e:
@@ -666,7 +666,8 @@ class portdbapi(dbapi):
                        match=0
                        cp = dep_getkey(mycpv)
                        if pkgdict.has_key(cp):
-                               matches = match_to_list(mycpv, pkgdict[cp].keys())
+                               cpv_slot = "%s:%s" % (mycpv, slot)
+                               matches = match_to_list(cpv_slot, pkgdict[cp].keys())
                                for atom in matches:
                                        pgroups.extend(pkgdict[cp][atom])
                                if matches: