From: Zac Medico Date: Thu, 18 Oct 2012 04:06:00 +0000 (-0700) Subject: emaint: fix MoveHandler for EAPI 5 sub-slot X-Git-Tag: v2.2.0_alpha141~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8ee446c9b6eda0940a93b4ce2f2ec92a652f591d;p=portage.git emaint: fix MoveHandler for EAPI 5 sub-slot --- diff --git a/pym/portage/emaint/modules/move/move.py b/pym/portage/emaint/modules/move/move.py index 29ff33005..e05076bc3 100644 --- a/pym/portage/emaint/modules/move/move.py +++ b/pym/portage/emaint/modules/move/move.py @@ -48,6 +48,7 @@ class MoveHandler(object): # progress bar is updated in indeterminate mode. match = self._tree.dbapi.match aux_get = self._tree.dbapi.aux_get + pkg_str = self._tree.dbapi._pkg_str if onProgress: onProgress(0, 0) for repo, updates in allupdates.items(): @@ -65,13 +66,14 @@ class MoveHandler(object): if update_cmd[0] == "move": origcp, newcp = update_cmd[1:] for cpv in match(origcp): - if repo_match(aux_get(cpv, ["repository"])[0]): + cpv = pkg_str(cpv, None) + if repo_match(cpv.repo): errors.append("'%s' moved to '%s'" % (cpv, newcp)) elif update_cmd[0] == "slotmove": pkg, origslot, newslot = update_cmd[1:] for cpv in match(pkg): - slot, prepo = aux_get(cpv, ["SLOT", "repository"]) - if slot == origslot and repo_match(prepo): + cpv = pkg_str(cpv, None) + if cpv.slot == origslot and repo_match(cpv.repo): errors.append("'%s' slot moved from '%s' to '%s'" % \ (cpv, origslot, newslot)) if onProgress: