upset, genini: different version ordering

Jon Turney jon.turney@dronecode.org.uk
Tue Oct 20 13:47:00 GMT 2015


On 19/10/2015 18:19, Achim Gratz wrote:
> Corinna Vinschen writes:
>>> I don't really want to spend effort on unravelling the complexities of the
>>> sorting that upset does, since I don't think it's worth keeping, and we
>>> should switch to a scheme which can be described in a paragraph,
>>> e.g. the scheme used by setup and RPM:
>>>
>>> Compare contiguous chunks of digits or non-digits.
>>> Non-digit chunks sort before digit chunks.
>>> Digit chunks sort numerically, non-digit chunks sort lexicographically.
>>> The version with a suffix remaining is the greater
>>
>> Sounds right to me.  If we can make the version handling equivalent to
>> RPM's, it would be really helpful, I think.
>
> While that is by far the most widespread system thanks to GNU/Linux, it
> is not the only one.  Emacs uses a very similar scheme, but treats
>
> 1.0alpha < 1.0beta < 1.0pre < 1.0 == 1.0.0 == 1.0.0.0

I think in upset sorting 1.0 < 1.0.0

> which sort of makes sense, but can't be handled by a simple
> lexicographical sort.  You also have to be able to ignore non-sortable
> components like Git commits.

These have to be preceded by a unique, sortable component (e.g. date) or 
you just can't get anywhere.  A scheme where 1.0.0-gitAAAAAAAA == 
1.0.0-gitBBBBBBBB isn't any use.

 >  All of this is already existing in Cygwin,

It exists in upset, but not in way that anyone can rely on working the 
way they think it's going to, since the implementation is bewildering 
and undocumented.



More information about the Cygwin-apps mailing list