Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 157118

Summary: sys-apps/busybox - busybox.static has strange sed
Product: Gentoo Linux Reporter: Niels Laukens <nielchiano>
Component: [OLD] Core systemAssignee: Embedded Gentoo Team <embedded>
Status: RESOLVED WONTFIX    
Severity: normal CC: napoleonb
Priority: High    
Version: 2006.1   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Niels Laukens 2006-12-04 10:25:20 UTC
This bug should probably go directly to the BusyBox bug-tracker; but I wanted to verify that I'm not alone on this.
Probably the busybox-dev's will start asking difficult questions for things like libraries and link-options; and I'd like to have same support then.

busybox sh
TEST="`echo abc | sed -n '/abc/p'`"; echo $TEST
# gives abc, as expected

busybox.static sh
TEST="`echo abc | sed -n '/abc/p'`"; echo $TEST
# gives empty line!!!!!!!

This bug hit me when trying to make an initramfs (hence the need for the static binary); it took me 3 hours to pin it down to the usage of sed INSIDE backticks (or the $() construct).

Can anyone confirm this bug?
Comment 1 Niels Laukens 2006-12-06 01:49:38 UTC
I tried this bug myself on different machines: all dynamicaly linked versions work perfectly, for the static-versien:
* 1.1.0 works
* 1.2.1 works
* 1.2.2.1 FAILS (on 3 different machines)

Also, it seems to be more general than only sed. These also fail (but DO work OUTSIDE backticks):
* echo `echo abc | grep abc`

but these work:
* echo `echo abc | awk '/abc/p'`
Comment 2 Niels Laukens 2006-12-06 10:42:34 UTC
Reported to the busybox bugtracker as
http://bugs.busybox.net/view.php?id=1110
Comment 3 Niels Laukens 2006-12-10 07:59:30 UTC
known bug according to busybox-bug-tracker
Comment 4 SpanKY gentoo-dev 2008-01-28 06:05:55 UTC
*** Bug 207735 has been marked as a duplicate of this bug. ***