GNU bug report logs - #5958
Sort-8.4 bug

Previous Next

Package: coreutils;

Reported by: srodri <at> datsi.fi.upm.es

Date: Fri, 16 Apr 2010 12:14:02 UTC

Severity: normal

Merged with 5991

Fixed in version 8.5

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #18 received at 5958-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: pacman <at> kosh.dhis.org
Cc: Santiago Rodriguez <srodri <at> fi.upm.es>, 5958-done <at> debbugs.gnu.org,
	Jim Meyering <jim <at> meyering.net>
Subject: Re: bug#5958: Sort-8.4 bug
Date: Mon, 19 Apr 2010 15:30:55 -0600
[Message part 1 (text/plain, inline)]
On 04/18/2010 03:00 AM, pacman <at> kosh.dhis.org wrote:
> Jim Meyering writes:
>>
>> pacman <at> kosh.dhis.org wrote:
>>> Eric Blake writes:
>>>> The syntax 'sort +1' is obsolete.  You are better off rewriting your
>>>
> POSIX abdicated its responsibility to fully document the sort command.

No, sort +1 was properly documented in POSIX 1992; unfortunately, that
old version of POSIX is not available online, and I don't have handy
access to a hardcopy or pdf version.  It was POSIX 2001 that withdrew
documentation for sort +1 as part of deprecating the syntax as obsolete,
while still allowing implementations to support it as a non-POSIX extension.

> This
> makes the traditional documentation (i.e. the V7 man page) the most
> authoritative specification for what "sort +1 -2" means.

I agree that the coreutils documentation (info sort) could do a better
job of documenting the translation from the obsolete syntax to the
current syntax.  If it weren't for copyright questions, I would even
agree that blind copy-and-paste from the link you gave:

http://www.freebsd.org/cgi/man.cgi?query=sort&apropos=0&sektion=0&manpath=SunOS+5.10&format=ascii

would make sense.  But to be on the safe side, the best approach would
be to write the rules by scratch, referring to the coreutils
implementation and nothing external.  Would you care to submit the patch?

> If you won't make
> GNU sort behave correctly, it is time to remove it from general distribution
> and let people go find a working sort command elsewhere.

First, you have to prove that sort is not behaving according to a
particular standards document.  And since POSIX 1992 _did_ document
'sort +1', that means quoting a relevant portion of that document along
with a simple test case demonstrating why you think coreutils does not
comply with that document.  If you can prove that, then we will gladly
fix the bug.

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 15 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.