[pacman-dev] vercmp discussion (was: String freeze for 3.2 release)
shiningxc at gmail.com
Thu Jul 17 08:20:00 EDT 2008
On Wed, Jul 16, 2008 at 10:17 PM, Nagy Gabor <ngaba at bibl.u-szeged.hu> wrote:
>> nicer, but harder ;-)
>> See 84283672853350a84d2a71b72dc06e180cad1587, search for 'type
> Hm. Wrong. With the new vercmp: 1.1 > 1.b (but in ASCII 'b' > '1'),
> strange. Our problem is at the end of string: '\0' vs. alpha, as I see,
> this case was handled after comment /* see if we ran out of segments on
> one string */
It indeed looks like we just need to handle the case where it runs out
of segments on one string.
But we have to handle two cases : run out of segments with the
-release number or without it.
So in both cases, I handle it differently if the last remaining
segment starts with a letter or not.
I am not 100% sure that it will work correctly in every single cases,
but the logic seems alright, there is no regression on all existing
vercmp test, and the 4 new tests you posted in an older thread now
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3343 bytes
Desc: not available
More information about the pacman-dev