From a2076bfb144b7cf23d9c21da0ceb557e18e9cb95 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 7 Sep 2012 13:52:03 -0700 Subject: [PATCH] UseManager: add compat code for getUseForce/PUSE Similar code was added to getUseMask in commit af50fee789e71c1fff0b405db4cf55b618b73466. --- pym/portage/package/ebuild/_config/UseManager.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pym/portage/package/ebuild/_config/UseManager.py b/pym/portage/package/ebuild/_config/UseManager.py index 185a14f44..a359e00b7 100644 --- a/pym/portage/package/ebuild/_config/UseManager.py +++ b/pym/portage/package/ebuild/_config/UseManager.py @@ -10,7 +10,7 @@ from portage import os from portage.dep import dep_getrepo, dep_getslot, ExtendedAtomDict, remove_slot, _get_useflag_re from portage.localization import _ from portage.util import grabfile, grabdict_package, read_corresponding_eapi_file, stack_lists, writemsg -from portage.versions import cpv_getkey, _pkg_str +from portage.versions import _pkg_str from portage.package.ebuild._config.helper import ordered_by_atom_specificity @@ -267,7 +267,10 @@ class UseManager(object): cp = getattr(pkg, "cp", None) if cp is None: - cp = cpv_getkey(remove_slot(pkg)) + slot = dep_getslot(pkg) + repo = dep_getrepo(pkg) + pkg = _pkg_str(remove_slot(pkg), slot=slot, repo=repo) + cp = pkg.cp try: stable = pkg.stable @@ -323,7 +326,10 @@ class UseManager(object): def getPUSE(self, pkg): cp = getattr(pkg, "cp", None) if cp is None: - cp = cpv_getkey(remove_slot(pkg)) + slot = dep_getslot(pkg) + repo = dep_getrepo(pkg) + pkg = _pkg_str(remove_slot(pkg), slot=slot, repo=repo) + cp = pkg.cp ret = "" cpdict = self._pusedict.get(cp) if cpdict: -- 2.26.2