[BusyBox] Monday's sed bug.

Rob Landley rob at landley.net
Sun Apr 18 19:46:47 UTC 2004


On Friday 16 April 2004 17:47, Glenn McGrath wrote:
> On Mon, 12 Apr 2004 21:38:22 -0500
>
> Rob Landley <rob at landley.net> wrote:
> > And dId you know busybox hasn't got a "diff" util?  I can't find it if
> > it does.  Patch, but no diff -u.  Still gotta use gnu diffutils at the
> > moment...
>
> Yea, i did "patch" because when i was trying to do my build from scratch
> stuff i was trying to build make without make, there is a script in
> makes source to do it, but it needs to be patched to work.
>
> I figured diff wouldnt be needed in the build system, if it was needed
> by the user then hopefully busybox would have enough to build
> diffutils..

It's on my to-do list to take a look at after 1.0...

> The "patch" in busybox is pretty minimal, the fuzz factor doesnt work,
> so patches have to apply cleanly, i did have the positive fuzz factor
> working at one stage, but to get the negative fuzz factor working would
> require heavy buffering, so i ended up dropping fuzz support.

"sort" reads in the whole file it's patching, as does "uniq".  Possibly we 
could lift and generalize the logic.  (Just read the file into memory, patch 
there, dump out.  With fuzz support as a compile time option.  Using 
unnecessary amounts of memory at runtime in order to keep the binary size 
small is a viable option in a lot of embedded systems, on bootable business 
card style cds (or knoppix variants), etc...)

Sorry if I'm incoherent.  Penguicon's closing down around me and I have had 
very little sleep, and I need to start driving again... :)

Oh, the Linux From Scratch build completes using busybox sed with the above 
patches.  (Apparently successfully; it _seems_ to work, although I haven't 
done too much testing yet.)

Working on getting the build to work with the rest of busybox now, but I have 
no time...

> Glenn

Rob




More information about the busybox mailing list