Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 83942 Details for
Bug 70416
portage considers versions '042' and '42' unequal
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
change match_from_list to use vercmp() for all operators
portage-equality-check.diff (text/plain), 1.28 KB, created by
Marius Mauch (RETIRED)
on 2006-04-04 18:30:59 UTC
(
hide
)
Description:
change match_from_list to use vercmp() for all operators
Filename:
MIME Type:
Creator:
Marius Mauch (RETIRED)
Created:
2006-04-04 18:30:59 UTC
Size:
1.28 KB
patch
obsolete
>--- /home/gentoo/portage/test-branches/vanilla/pym/portage.py 2006-03-04 03:25:20.957635000 +0100 >+++ /usr/lib/portage/pym/portage.py 2006-04-05 04:30:07.957336888 +0200 >@@ -3752,6 +3698,18 @@ > > return operator > >+def cpvequal(cpv1, cpv2): >+ split1 = catpkgsplit(cpv1) >+ split2 = catpkgsplit(cpv2) >+ >+ if not split1 or not split2: >+ raise portage_exception.PortageException("Invalid data, parameter was not a CPV") >+ >+ if split1[0] != split2[0]: >+ return False >+ >+ return (pkgcmp(split1[1:], split2[1:]) == 0) >+ > > def match_from_list(mydep,candidate_list): > if mydep[0] == "!": >@@ -3790,19 +3748,18 @@ > mylist.append(x) > > elif operator == "=": # Exact match >- if mycpv in candidate_list: >- mylist = [mycpv] >+ mylist = [cpv for cpv in candidate_list if cpvequal(cpv, mycpv)] > > elif operator == "=*": # glob match > # The old verion ignored _tag suffixes... This one doesn't. > for x in candidate_list: >- if x[0:len(mycpv)] == mycpv: >+ if cpvequal(x[0:len(mycpv)], mycpv): > mylist.append(x) > > elif operator == "~": # version, any revision, match > for x in candidate_list: > xs = catpkgsplit(x) >- if xs[0:2] != mycpv_cps[0:2]: >+ if not cpvequal(xs[0]+"/"+xs[1]+"-"+xs[2], mycpv_cps[0]+"/"+mycpv_cps[1]+"-"+mycpv_cps[2]): > continue > if xs[2] != ver: > continue
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 70416
: 83942