From: Zac Medico Date: Sun, 13 May 2012 21:42:08 +0000 (-0700) Subject: egencache: use vercmp instead of pkgcmp X-Git-Tag: v2.2.0_alpha105~30 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=89b320a22b7e2504d00e18475e07e43ab56f2ad3;p=portage.git egencache: use vercmp instead of pkgcmp --- diff --git a/bin/egencache b/bin/egencache index 13860bca0..2f53b40e3 100755 --- a/bin/egencache +++ b/bin/egencache @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2009-2011 Gentoo Foundation +# Copyright 2009-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function @@ -42,7 +42,7 @@ from portage.manifest import guessManifestFileType from portage.util import cmp_sort_key, writemsg_level from portage import cpv_getkey from portage.dep import Atom, isjustname -from portage.versions import pkgcmp, pkgsplit, vercmp +from portage.versions import pkgsplit, vercmp try: from xml.etree import ElementTree @@ -570,7 +570,7 @@ class GenUseLocalDesc(object): return cmp_func(atomb.operator, atoma.operator) # Version matching elif atoma.cpv != atomb.cpv: - return pkgcmp(pkgsplit(atoma.cpv), pkgsplit(atomb.cpv)) + return vercmp(atoma.version, atomb.version) # Versions match, let's fallback to operator matching else: return cmp_func(ops.get(atoma.operator, -1),