Subject: bug#35939: version sort is incorrect with hyphen-minus

From: Florian Weimer <[email-masked]>
Date: Fri, 28 Jun 2019 21:18:26 +0200

* Vincent Lefevre:

> On 2019-06-26 18:40:50 -0700, Paul Eggert wrote:
>> Perhaps the coreutils manual could be improved to make this all clearer, and
>> perhaps it should refer to the Debian manual if it doesn't already.
>
> In this case, there should be a new ordering option to provide
> true numeric sort with strings mixing non-negative integers and
> characters.

There's no one true numeric sort.  Some versioning schemes interpret
numbers after a dot as decimal fractions (so that 1.9 > 1.10), but it's
more common to split version strings into tuple somehow and then sort
the non-numeric parts lexicographically, and the numeric parts as
integers (so that 1.9 < 1.10).

Thanks,
Florian