Anonymous | Login | Signup for a new account | 11-10-2008 12:31 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0004204 | [BusyBox] Standards Compliance | major | always | 07-17-08 02:30 | 07-17-08 11:05 | ||||
Reporter | etwills | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | |||||||
Summary | 0004204: 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. |
||||||||
Additional Information |
[building] wills$ ( cd busybox-1.10.4/ && sed '/CONFIG_[A-Z]*NAME/ ! { s/^/# / ; s/=y/ is not set/ ; s/# # /# / }' scripts/defconfig > .config && yes '' | make oldconfig && make ) > /dev/null && find busybox-1.10.4/ -name busybox busybox-1.10.4/busybox busybox-1.10.4/include/config/busybox wills$ ( cd busybox-1.11.1/ && sed '/CONFIG_[A-Z]*NAME/ ! { s/^/# / ; s/=y/ is not set/ ; s/# # /# / }' scripts/defconfig > .config && yes '' | make oldconfig && make ) > /dev/null && find busybox-1.11.1/ -name busybox busybox-1.11.1/busybox busybox-1.11.1/include/config/busybox [ demonstrating sanity of dirname ] wills$ ./busybox-1.10.4/busybox dirname foo/bar ; echo $? foo 0 wills$ ./busybox-1.11.1/busybox dirname foo/bar ; echo $? foo 0 wills$ bash -c 'dirname foo/bar ; echo $?' foo 0 [ demonstrating inconsistency in basename ] wills$ ./busybox-1.10.4/busybox basename foo/bar ; echo $? bar 0 wills$ ./busybox-1.11.1/busybox basename foo/bar ; echo $? bar 1 wills$ bash -c 'basename foo/bar ; echo $?' bar 0 |
||||||||
Attached Files | |||||||||
|
Notes | |
(0009654) 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 |
(0009664) 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 [^] |
Copyright © 2000 - 2006 Mantis Group |