On 31/01/2021 11:21, Geert Stappers wrote:
>
> Besides not pretty,  it is also not readable.
> Plus '-k 1.6,1.6' looks very odd in that line. 
> 
> |  sort -k1.2,1.5r -k1.6,1.7r -k1.8,1.9r -k1.10,1.11r
> looks more "having a pattern"

But it's wrong. The -k1.6,1.6 sorts on the first letter _after_ the
version number, so it sorts v2.65 before v2.65rc1 before v.265test1,
because <nothing> sorts before 'r' which sorts before 't'
> 
> 
> Frankly I think we are repairing at the wrong place.
> Instead of handcrafting a sort algoritme, we should repair our
> versioning name convention.  Tilde to the  rescue   :-)

Fixing the sort happens in one place, adapting my brain to a new
convention is less certain, and leaves a break in the record of versions.



I just committed another tweak, to get eg v2.65test1 and v2.65test11 in
the correct order.



Cheers,

Simon.



_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to