Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 188656 Details for
Bug 266493
[patch] vercmp in sys-apps/portage-2.2_rc30 and earlier can return long
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ensure vercmp output is -1, 0 or 1
portage_vercmp_nolongs.patch (text/plain), 1.24 KB, created by
Douglas Anderson
on 2009-04-17 09:24:47 UTC
(
hide
)
Description:
ensure vercmp output is -1, 0 or 1
Filename:
MIME Type:
Creator:
Douglas Anderson
Created:
2009-04-17 09:24:47 UTC
Size:
1.24 KB
patch
obsolete
>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): >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 266493
: 188656 |
188763