diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-04-21 00:56:22 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-04-21 00:56:22 +0000 |
commit | faa7d863fcdfe380a173cf7a005f481066bef703 (patch) | |
tree | 6e5d50cc8510396114dfbaf5a3a67eb54f79c222 /testsuite/sed/sed-next-line | |
parent | 1219879422fa33bf45d1eea0926483821e375bef (diff) | |
download | busybox-faa7d863fcdfe380a173cf7a005f481066bef703.tar.gz |
So I'm building a linux from scratch system, using a working script to do this
that the _only_ change to is that gnu sed has been replaced with busybox sed.
And ncurses' install phase hangs. I trace it down, and it's trying to run
gawk. (Insert obligatory doubletake, but this is FSF code we're talking
about, so...)
It turns out gawk shells out to sed, ala "sed -f /tmp/blah file.h". The
/tmp/blah file is basically empty (it contains one character, a newline). So
basically, gawk is using sed as "cat". With gnu sed, it works like cat,
anyway.
With busybox sed, it tests if its command list is empty after parsing the
command line, and if the list is empty it takes the first file argument as a
sed command string, and if that leaves the file list empty it tries to read
the data to operate on from stdin. (Hence the hang, since nothing's coming
in on stdin...)
It _should_ be testing whether there were any instances of -f or -e, not
whether it actually got any commands. Using sed as cat may be kind of
stupid, but it's valid and gawk relies on this behavior.
Here's a patch to fix it, turning a couple of ints into chars in hopes of
saving a bit of the space this adds. Comments?
Rob
Diffstat (limited to 'testsuite/sed/sed-next-line')
0 files changed, 0 insertions, 0 deletions