GNU bug report logs - #6124
basename/dirname are not POSIX compliant on arg starting with a dash

Previous Next

Package: coreutils;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Thu, 6 May 2010 11:36:02 UTC

Severity: normal

Tags: notabug

Merged with 6123

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
Cc: bug-coreutils <at> gnu.org, Vincent Lefevre <vincent <at> vinc17.net>, 580492 <at> bugs.debian.org
Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash
Date: Thu, 06 May 2010 07:49:31 -0600
[Message part 1 (text/plain, inline)]
On 05/06/2010 07:41 AM, Eric Blake wrote:
>> According to POSIX[*], basename and dirname take no options (examples
>> in POSIX also assume that), so that this would make BusyBox's behavior
>> correct.
> 
> No, you're missing one other key point of POSIX:
> 
> http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html
> Section 1.4, OPTIONS:

If you want more evidence from POSIX that 'basename -- foo' is mandated
behavior, read up on this correction to POSIX:
http://austingroupbugs.net/view.php?id=192

-- 
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 14 years and 117 days ago.

Previous Next


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