From: Zac Medico Date: Thu, 18 Oct 2012 02:09:49 +0000 (-0700) Subject: actions.py: use _pkg_str for EAPI 5 sub-slot X-Git-Tag: v2.2.0_alpha141~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4f5233d38e2a0f29cd6e9032116730579868a263;p=portage.git actions.py: use _pkg_str for EAPI 5 sub-slot --- diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index fb80173c4..fec2dfa55 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -1285,11 +1285,8 @@ def action_deselect(settings, trees, opts, atoms): allow_repo=True, allow_wildcard=True)) for cpv in vardb.match(atom): - slot, = vardb.aux_get(cpv, ["SLOT"]) - if not slot: - slot = "0" - expanded_atoms.add(Atom("%s:%s" % \ - (portage.cpv_getkey(cpv), slot))) + pkg = vardb._pkg_str(cpv, None) + expanded_atoms.add(Atom("%s:%s" % (pkg.cp, pkg.slot))) discard_atoms = set() for atom in world_set: @@ -2658,13 +2655,8 @@ def action_uninstall(settings, trees, ldpath_mtimes, if owners: for cpv in owners: - slot = vardb.aux_get(cpv, ['SLOT'])[0] - if not slot: - # portage now masks packages with missing slot, but it's - # possible that one was installed by an older version - atom = portage.cpv_getkey(cpv) - else: - atom = '%s:%s' % (portage.cpv_getkey(cpv), slot) + pkg = vardb._pkg_str(cpv, None) + atom = '%s:%s' % (pkg.cp, pkg.slot) valid_atoms.append(portage.dep.Atom(atom)) else: writemsg_level(("!!! '%s' is not claimed " + \