Debian Bug report logs - #783457
libsort-naturally-perl: Doesn't sort properly with numbers at the beginning of a string

version graph

Package: libsort-naturally-perl; Maintainer for libsort-naturally-perl is Debian Perl Group <[email protected]>; Source for libsort-naturally-perl is src:libsort-naturally-perl (PTS, buildd, popcon).

Reported by: Axel Beckert <[email protected]>

Date: Mon, 27 Apr 2015 08:12:02 UTC

Severity: normal

Found in version libsort-naturally-perl/1.02-1

Forwarded to https://github.com/bingos/sort-naturally/issues/3

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], [email protected], Debian Perl Group <[email protected]>:
Bug#783457; Package libsort-naturally-perl. (Mon, 27 Apr 2015 08:12:06 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <[email protected]>:
New Bug report received and forwarded. Copy sent to [email protected], Debian Perl Group <[email protected]>. (Mon, 27 Apr 2015 08:12:06 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Axel Beckert <[email protected]>
To: [email protected]
Subject: libsort-naturally-perl: Doesn't sort properly with numbers at the beginning of a string
Date: Mon, 27 Apr 2015 10:10:13 +0200
Package: libsort-naturally-perl
Version: 1.02-1

Axel Beckert wrote:
> Control: clone -1 -2

Cloning of https://bugs.debian.org/781657 failed due to merged bugs.
So I rather just open a new one. My mail already had all relevant
information:

> Thomas Liske wrote:
> > On 04/01/2015 02:14 PM, Thomas Liske wrote:
> > > The expected kernel version reported by needrestart is the first one...
> > > I need to review why i.e. 4.9 looses against 3.10.
> > 
> > the kernel version sorting was based on Sort::Naturally which does not
> > work since the rightmost integer found in the version string is used as
> > the primary sorting index. Therefore 4.0 will loose against any 3.x
> > (x>0) kernels :-/
> 
> Thomas Liske wrote earlier:
> > $VAR1 = [
> >           '4.20.0-rc6-tp520-btrfs-trim+',
> >           '4.20.0',
> >           '4.19.0-rc6-tp520-btrfs-trim+',
> >           '4.19.0',
> >           '4.10',
> >           '3.19.3-rc6-tp520-btrfs-trim+',
> >           '3.19.3',
> >           '3.19.0-rc7-tp520+',
> >           '3.10',
> >           '4.9',
> >           '4.4.0-foo',
> >           '4.4.0',
> >           '4.0.0-rc6-tp520-btrfs-trim+',
> >           '4.0.0',
> >           '4.0',
> >           '3.9',
> >           '3.3',
> >           '2.6'
> >         ];
> >
> > The expected kernel version reported by needrestart is the first one...
> > I need to review why i.e. 4.9 looses against 3.10.
> 
> This looks like a bug in Sort::Naturally upstream:
> 
> $ perl -MSort::Naturally -E 'say join("\n", nsort(qw(1.fnord 3.bar 1-foo 2.gnarz 3.19-foo 4.0-bla 3-19-foo 4-0-foo)))'
> 1.fnord
> 1-foo
> 2.gnarz
> 3.bar
> 4.0-bla
> 4-0-foo
> 3-19-foo
> 3.19-foo
> $
[Dropping the non-relevant stuff which only applied to needrestart]

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <[email protected]>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Set Bug forwarded-to-address to 'https://github.com/bingos/sort-naturally/issues/3'. Request was from Florian Schlichting <[email protected]> to [email protected]. (Thu, 26 Oct 2017 21:57:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Sun Sep 22 09:39:21 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.