Bug 693477

Summary: busybox dirname violates POSIX
Product: [Fedora] Fedora Reporter: Eric Blake <eblake>
Component: busyboxAssignee: Denys Vlasenko <dvlasenk>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: dvlasenk, maxamillion
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-04 15:40:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Eric Blake 2011-04-04 19:09:59 UTC
Description of problem:
POSIX requires that any utility that takes operands must accept and ignore -- as the first argument, to allow for alternate implementations that support options (unless explicitly documented otherwise, such as 'echo').

dirname is not explicitly documented otherwise; therefore, 'dirname a' and 'dirname -- a' are required by POSIX to behave identically.

Version-Release number of selected component (if applicable):
busybox-1.15.1-7.fc14.x86_64

How reproducible:
100%

Steps to Reproduce:
1. busybox dirname -- a
2. echo $?
  
Actual results:
BusyBox v1.15.1 (2010-05-05 10:58:54 UTC) multi-call binary

Usage: dirname FILENAME

Strip non-directory suffix from FILENAME
1

Expected results:
.
0

Additional info:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8420

Comment 1 Denys Vlasenko 2011-07-20 12:31:47 UTC
This is fixed in upstream.

I guess it's time to release 1.19.0...

Comment 2 Denys Vlasenko 2011-11-01 12:42:57 UTC
1.19.3 is in rawhide now:

http://koji.fedoraproject.org/koji/buildinfo?buildID=271674

and it addresses this BZ