LibraryConsumerSet: fix for EAPI 5 sub-slot
authorZac Medico <zmedico@gentoo.org>
Thu, 18 Oct 2012 03:06:45 +0000 (20:06 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 18 Oct 2012 03:06:45 +0000 (20:06 -0700)
pym/portage/_sets/libs.py

index 6c5babc13acd3e9ad3a0369bdb7602e8fac8e6e3..27ef50e712b4880fb5e151c2dd64c6577a3fffd0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2007-2011 Gentoo Foundation
+# Copyright 2007-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from __future__ import print_function
@@ -6,7 +6,6 @@ from __future__ import print_function
 from portage.localization import _
 from portage._sets.base import PackageSet
 from portage._sets import get_boolean, SetConfigError
-from portage.versions import cpv_getkey
 import portage
 
 class LibraryConsumerSet(PackageSet):
@@ -22,14 +21,14 @@ class LibraryConsumerSet(PackageSet):
                for p in paths:
                        for cpv in self.dbapi._linkmap.getOwners(p):
                                try:
-                                       slot, = self.dbapi.aux_get(cpv, ["SLOT"])
+                                       pkg = self.dbapi._pkg_str(cpv, None)
                                except KeyError:
                                        # This is expected for preserved libraries
                                        # of packages that have been uninstalled
                                        # without replacement.
                                        pass
                                else:
-                                       rValue.add("%s:%s" % (cpv_getkey(cpv), slot))
+                                       rValue.add("%s:%s" % (pkg.cp, pkg.slot))
                return rValue
 
 class LibraryFileConsumerSet(LibraryConsumerSet):