For bug #181551, support slot deps in package.keywords. (branches/2.1.2 r6791)
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 03:43:18 +0000 (03:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 03:43:18 +0000 (03:43 -0000)
svn path=/main/branches/2.1.2.9/; revision=7458

pym/portage.py

index 68a0230898da52a6c771baff2bc9e08ae8de4287..1e9d104af1e4d1b97f0873107187fa70071f7ed4 100644 (file)
@@ -6266,13 +6266,14 @@ class portdbapi(dbapi):
 
                accept_keywords = self.mysettings["ACCEPT_KEYWORDS"].split()
                pkgdict = self.mysettings.pkeywordsdict
+               aux_keys = ["KEYWORDS", "EAPI", "SLOT"]
                for mycpv in mylist:
                        try:
-                               keys, eapi = self.aux_get(mycpv, ["KEYWORDS", "EAPI"])
+                               keys, eapi, slot = self.aux_get(mycpv, aux_keys)
                        except KeyError:
                                continue
                        except portage_exception.PortageException, e:
-                               writemsg("!!! Error: aux_get('%s', ['KEYWORDS', 'EAPI'])\n" % \
+                               writemsg("!!! Error: aux_get('%s', %s)\n" % (mycpv, aux_keys),
                                        mycpv, noiselevel=-1)
                                writemsg("!!! %s\n" % str(e), noiselevel=-1)
                                del e
@@ -6283,7 +6284,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: