Make LibraryConsumerSet.mapPathsToAtoms() produce slot atoms so that atoms
authorZac Medico <zmedico@gentoo.org>
Tue, 19 Feb 2008 01:53:45 +0000 (01:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Feb 2008 01:53:45 +0000 (01:53 -0000)
aren't restricted to the currently installed version, making upgrades
possible.

svn path=/main/trunk/; revision=9351

pym/portage/sets/dbapi.py

index a1b902fdcc4db9abf2072032ab237907ea23f656..220ff2283498a44fc5c27d7c5b2b9178b3fad581 100644 (file)
@@ -126,8 +126,10 @@ class LibraryConsumerSet(PackageSet):
                        link = dblink(mysplit[0], mysplit[1], myroot=self.dbapi.root, \
                                        mysettings=self.dbapi.settings, treetype='vartree', \
                                        vartree=self.dbapi.vartree)
-                       if paths.intersection(link.getcontents().keys()):
-                               rValue.add("/".join(catpkgsplit(cpv)[:2]))
+                       if paths.intersection(link.getcontents()):
+                               cat, pn = catpkgsplit(cpv)[:2]
+                               slot = self.dbapi.aux_get(cpv, ["SLOT"])[0]
+                               rValue.add("%s/%s:%s" % (cat, pn, slot))
                return rValue