On Wed, Jul 16, 2008 at 10:17 PM, Nagy Gabor <[EMAIL PROTECTED]> wrote:
>
>> nicer, but harder ;-)
>> See 84283672853350a84d2a71b72dc06e180cad1587, search for 'type
>> mismatch'.
>>
> 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
pass fine.

Attachment: 0001-versioncmp-fix-handling-of-alphanumeric-versions.patch
Description: application/mbox

_______________________________________________
pacman-dev mailing list
[email protected]
http://archlinux.org/mailman/listinfo/pacman-dev

Reply via email to