Index: /development/co/portage/trunk/pym/portage/versions.py =================================================================== --- /development/co/portage/trunk/pym/portage/versions.py (revision 13251) +++ /development/co/portage/trunk/pym/portage/versions.py (working copy) @@ -49,7 +49,7 @@ return 0 mykey=ver1+":"+ver2 try: - return vercmp_cache[mykey] + return cmp(vercmp_cache[mykey], 0) except KeyError: pass match1 = ver_regexp.match(ver1) @@ -125,7 +125,7 @@ return 1 elif list1[i] != list2[i]: vercmp_cache[mykey] = list1[i] - list2[i] - return list1[i] - list2[i] + return cmp(list1[i] - list2[i], 0) # main version is equal, so now compare the _suffix part list1 = match1.group(6).split("_")[1:] @@ -142,7 +142,7 @@ else: s2 = suffix_regexp.match(list2[i]).groups() if s1[0] != s2[0]: - return suffix_value[s1[0]] - suffix_value[s2[0]] + return cmp(suffix_value[s1[0]] - suffix_value[s2[0]], 0) if s1[1] != s2[1]: # it's possible that the s(1|2)[1] == '' # in such a case, fudge it. @@ -155,7 +155,7 @@ except ValueError: r2 = 0 if r1 - r2: - return r1 - r2 + return cmp(r1 - r2, 0) # the suffix part is equal to, so finally check the revision if match1.group(10):