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

From: Ian Jackson <[email-masked]>
Date: Thu, 27 Jun 2019 00:54:20 +0100

Ian Jackson writes ("Re: bug#35939: version sort is incorrect with hyphen-minus"):
> Paul Eggert writes ("Re: bug#35939: version sort is incorrect with hyphen-minus"):
> > GNU sort uses the same algorithm as glibc strverscmp, and this algorithm has 
> > changed only once since strverscmp was added to glibc in 1997. The change was 
> > made in 2009, to fix this bug:
> > 
> > https://sourceware.org/bugzilla/show_bug.cgi?id=9913
> > 
> > Has the Debian version-comparison algorithm changed since 1997? If so, could you 
> > give details about the changes to the Debian algorithm? Perhaps glibc should be 
> > changed to stay consistent with Debian.
> 
> Debian introduced a special (and very useful) meaning for ~, many
> years ago now.
> 
> I checked the Debian policy manual and according to its upgrading
> checklist this change was made in 2007.

I have just checked the manpage I have here for strverscmp and it is
far from clear to me that the algorithm described there, and the dpkg
algorithm, produce the same answers.  (Even disregarding ~, and the
fact that the specification of the dpkg algorithm is defined only over
a subset of possible strings even though the unique extension to UTF-8
strings is fairly obvious.)

-- 
Ian Jackson <[email-masked]>   These opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.