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: Vincent Lefevre <vincent <at> vinc17.net>
To: Eric Blake <eblake <at> redhat.com>
Cc: bug-coreutils <at> gnu.org, Pádraig Brady <P <at> draigBrady.com>, 580492 <at> bugs.debian.org
Subject: bug#6124: basename/dirname are not POSIX compliant on arg starting with a dash
Date: Thu, 6 May 2010 17:38:51 +0200
On 2010-05-06 08:02:04 -0600, Eric Blake wrote:
> On 05/06/2010 07:23 AM, Vincent Lefevre wrote:
> > According to
> > 
> >   grep 'basename --' /usr/bin/*
> >   grep 'basename \$' /usr/bin/*
> > 
> > on my Debian machine, almost all scripts use basename without "--".
> > The only exceptions are autoconf (but I'm not sure this counts, as
> > there's a test for "basename --" first,
> 
> Can you find an actual example of this?  I think you read it
> incorrectly, as really, autoconf first tests for 'basename -- /', but if
> you indeed found an instance of autoconf testing for 'basename --', that
> would be a bug in autoconf that needs to be reported to that list.

Sorry, I meant it was testing basename with "--" as the first
argument while in this case it is useless. So, I wondered whether
the goal of this test was to test whether this form was supported.

> >> Note solaris behaves like busybox and openbsd behaves like coreutils.
> > 
> > Perhaps they're copying coreutils without looking at what POSIX says.
> 
> Or, more likely, perhaps they are independently obeying what POSIX says,
> without reference to either coreutils or busybox.

So, I think I should reassign the bug to busybox?

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)





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.