[BusyBox 0004204]: v1.11.x basename applet exit code inconsistent with dirname's, previous versions

bugs at busybox.net bugs at busybox.net
Thu Jul 17 11:05:43 PDT 2008


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=4204 
====================================================================== 
Reported By:                etwills
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   4204
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             07-17-2008 02:30 PDT
Last Modified:              07-17-2008 11:05 PDT
====================================================================== 
Summary:                    v1.11.x basename applet exit code inconsistent with
dirname's, previous versions
Description: 
The busybox 'basename' applet exits with a non-zero return code. This is
inconsistent with the behaviour of the dirname applet, with basename in
previous (1.10.x and earlier) busybox releases, and with coreutils.

The non-zero return code breaks scripts which expect `basename "$0" ||
echo "$0" | sed '[...]'` to cater for basename being absent on any given
system. Consequently, for example, grep 2.5.1a [latest known good
out-of-box version] builds in a chroot environment with busybox 1.10.4 as
basename, but not with 1.11.1.
====================================================================== 

---------------------------------------------------------------------- 
 vda - 07-17-08 11:03  
---------------------------------------------------------------------- 
Replace

full_write(STDOUT_FILENO, s, m) == (ssize_t)m
with
full_write(STDOUT_FILENO, s, m) != (ssize_t)m

in basename.c 

---------------------------------------------------------------------- 
 vda - 07-17-08 11:05  
---------------------------------------------------------------------- 
fix for 1.11.2:

http://busybox.net/downloads/fixes-1.11.1/busybox-1.11.1-basename.patch 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-17-08 02:30  etwills        New Issue                                    
07-17-08 02:30  etwills        Status                   new => assigned     
07-17-08 02:30  etwills        Assigned To               => BusyBox         
07-17-08 11:03  vda            Note Added: 0009654                          
07-17-08 11:05  vda            Status                   assigned => closed  
07-17-08 11:05  vda            Note Added: 0009664                          
======================================================================



More information about the busybox-cvs mailing list