Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 26671 | Differences between
and this patch

Collapse All | Expand All

(-)/tmp/portage-2.0.49-r6/pym/portage.py (-8 / +9 lines)
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-2278 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
	r1=pkg1[2][1:] #string.atoi(pkg1[2][1:])
2275
	r2=string.atoi(pkg2[2][1:])
2339
	r2=pkg2[2][1:] #string.atoi(pkg2[2][1:])
2276
	if r1>r2:
2340
	if r1>r2:
2277
		return 1
2341
		return 1
2278
	if r2>r1:
2342
	if r2>r1:
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="0"
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=="0":
2919
				return []
3016
				return []
2920
			else:
3017
			else:
2921
				return [mymatch]
3018
				return [mymatch]

Return to bug 26671