From 556e8ffe4930ffc6cc02c0cd2d0d9d17b73b1d71 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 18 Apr 2009 04:45:43 +0000 Subject: Simplify pkgcmp(). Thanks to Douglas Anderson for this patch from bug #266493. svn path=/main/trunk/; revision=13354 --- pym/portage/versions.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'pym/portage/versions.py') diff --git a/pym/portage/versions.py b/pym/portage/versions.py index 13ce47897..299988061 100644 --- a/pym/portage/versions.py +++ b/pym/portage/versions.py @@ -203,15 +203,7 @@ def pkgcmp(pkg1, pkg2): """ if pkg1[0] != pkg2[0]: return None - mycmp = vercmp("-".join(pkg1[1:]), "-".join(pkg2[1:])) - if mycmp is None: - return mycmp - if mycmp > 0: - return 1 - if mycmp < 0: - return -1 - return 0 - + return vercmp("-".join(pkg1[1:]), "-".join(pkg2[1:])) pkgcache={} -- cgit v1.2.3-1-g7c22