Toybox patch for busybox.

Denys Vlasenko vda.linux at googlemail.com
Mon Aug 16 23:37:00 UTC 2010


On Monday 16 August 2010 20:45, Rob Landley wrote:
> > I need a few changes/fixes there before I can put it into bbox:
> >
> > (1) It fails one test which current bbox's one does not fail.
> > With this patch:
> >
> > --- input.doesnt_exist        Jan 01 01:01:01 2000
> > +++ input       Jan 01 01:01:01 2000
> > @@ -1,2 +1,3 @@
> >  qwe
> > +asd
> >  zxc
> >
> > "patch -R" tries to patch file named "input.doesnt_exist"
> > whereas it should patch file "input".
> 
> Actually there's no standard about which one it should patch when the two 
> filenames differ.  (I researched this when implementing patch.  This is why 
> everybody does -p1, so that the old and new paths under the directory you diff 
> can be identical and this issue gets glossed over.)

Well, that's what GNU patch does. And that's what users were complaining about.


> > (3) it does not support -N. bbox one does.
> 
> It's got a longish todo list of things that could be added.

Well, this particular thing would be a regression from patch applet
before the change.

But it's moot now - I just fixed it. Notw there are no regressions
(that I know of).


> > I fixed (1) and (2) and committed the result to git. So you can pull it
> > and hack on it.
> 
> I'm not sure "fixed" is the right word for (1), I suspect you just grabbed one 
> of the many behaviors the gnu heuristic could squeeze out, which may or may 
> not have been an improvement.

Well, since it made testsuite to not fail, that's a fix in my book.


> > > I'm also working on a patch to implement -l support (squash whitespace)
> > > if you're interested.  And at some point I should do fuzz factor support,
> > > and better error reporting.  And add a CONFIG symbol to chop out most of
> > > the command line options...
> >
> > I will try to not get in the way (in patch.c) for now then.
> 
> Oh go ahead and have fun, I'll migrate my stuff when you get to a good stopping 
> point. :)

I believe current git should be good enough, since it is toybox's patch
plus a few small fixes on top.

Please report any bugs.

Can I actively hack on bbox's patch.c now or you want to take a stab at it?

-- 
vda


More information about the busybox mailing list