From: Zac Medico Date: Fri, 7 Sep 2012 20:52:03 +0000 (-0700) Subject: UseManager: add compat code for getUseForce/PUSE X-Git-Tag: v2.2.0_alpha125~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a2076bfb144b7cf23d9c21da0ceb557e18e9cb95;p=portage.git UseManager: add compat code for getUseForce/PUSE Similar code was added to getUseMask in commit af50fee789e71c1fff0b405db4cf55b618b73466. --- 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: