less than 01.10, which it is not if you interpret it as a float.
Instead pick the both components as separate integer values and compare
the sub-part if the main part is equal.
Fix crash in emerge --info that occurs if an interrevision package is
emerged which is listed. As far as I am aware this the cast to an int
is pointless here (pym/emerge/__init__.py) as it is processed as string
in portage.vercmp anyway.
svn path=/main/branches/prefix/; revision=6335
for ver in verlist:
verparts = ver.split("-")
if len(verparts) == 2:
- verrev = int(verparts[1][1:])
+ verrev = verparts[1][1:]
else:
verrev = 0
x = 0
# while still staying in the main tree versioning scheme.
if match1.group(10):
if match1.group(10)[0] == '0':
- r1 = float(match1.group(10)[1:])
+ t = match1.group(10)[1:].split(".")
+ r1 = int(t[1])
+ r3 = int(t[2])
else:
r1 = int(match1.group(10))
else:
r1 = 0
if match2.group(10):
if match2.group(10)[0] == '0':
- r2 = float(match2.group(10)[1:])
+ t = match2.group(10)[1:].split(".")
+ r2 = int(t[1])
+ r4 = int(t[2])
else:
r2 = int(match2.group(10))
else:
r2 = 0
+ if r1 == r2 and (r3 != 0 or r4 != 0):
+ r1 = r3
+ r2 = r4
vercmp_cache[mykey] = r1 - r2
return r1 - r2