Lines 2126-2133
Link Here
|
2126 |
myrev=myparts[-1] |
2189 |
myrev=myparts[-1] |
2127 |
if len(myrev) and myrev[0]=="r": |
2190 |
if len(myrev) and myrev[0]=="r": |
2128 |
try: |
2191 |
try: |
2129 |
string.atoi(myrev[1:]) |
2192 |
#string.atoi(myrev[1:]) |
2130 |
revok=1 |
2193 |
if re.compile("r[0-9]+[a-zA-Z]*").search(myrev): |
|
|
2194 |
revok=1 |
2131 |
except: |
2195 |
except: |
2132 |
pass |
2196 |
pass |
2133 |
if revok: |
2197 |
if revok: |
Lines 2271-2281
Link Here
|
2271 |
return 1 |
2335 |
return 1 |
2272 |
if mycmp<0: |
2336 |
if mycmp<0: |
2273 |
return -1 |
2337 |
return -1 |
2274 |
r1=string.atoi(pkg1[2][1:]) |
2338 |
m1=re.match("r([0-9]+)([a-zA-Z]*)", pkg1[2]) |
2275 |
r2=string.atoi(pkg2[2][1:]) |
2339 |
m2=re.match("r([0-9]+)([a-zA-Z]*)", pkg2[2]) |
2276 |
if r1>r2: |
2340 |
r1=string.atoi(m1.group(1)) #string.atoi(pkg1[2][1:]) |
|
|
2341 |
r2=string.atoi(m2.group(1)) #string.atoi(pkg2[2][1:]) |
2342 |
if r1>r2 or (r1==r2 and m1.group(2) > m2.group(2)): |
2277 |
return 1 |
2343 |
return 1 |
2278 |
if r2>r1: |
2344 |
if r2>r1 or (r1==r2 and m2.group(2) > m1.group(2)): |
2279 |
return -1 |
2345 |
return -1 |
2280 |
return 0 |
2346 |
return 0 |
2281 |
|
2347 |
|
Lines 2901-2907
Link Here
|
2901 |
elif mydep[0]=="~": |
2998 |
elif mydep[0]=="~": |
2902 |
if cp_key==None: |
2999 |
if cp_key==None: |
2903 |
return [] |
3000 |
return [] |
2904 |
myrev=-1 |
3001 |
myrev="-1" |
2905 |
for x in mylist: |
3002 |
for x in mylist: |
2906 |
cp_x=catpkgsplit(x) |
3003 |
cp_x=catpkgsplit(x) |
2907 |
if cp_x==None: |
3004 |
if cp_x==None: |
Lines 2912-2921
Link Here
|
2912 |
if cp_key[2]!=cp_x[2]: |
3009 |
if cp_key[2]!=cp_x[2]: |
2913 |
#if version doesn't match, skip it |
3010 |
#if version doesn't match, skip it |
2914 |
continue |
3011 |
continue |
2915 |
if string.atoi(cp_x[3][1:])>myrev: |
3012 |
if cp_x[3][1:] > myrev: #string.atoi(cp_x[3][1:])>myrev: |
2916 |
myrev=string.atoi(cp_x[3][1:]) |
3013 |
myrev=cp_x[3][1:] #string.atoi(cp_x[3][1:]) |
2917 |
mymatch=x |
3014 |
mymatch=x |
2918 |
if myrev==-1: |
3015 |
if myrev=="-1": |
2919 |
return [] |
3016 |
return [] |
2920 |
else: |
3017 |
else: |
2921 |
return [mymatch] |
3018 |
return [mymatch] |