diff -Naur

Rob Landley rob at landley.net
Sat Nov 22 10:32:57 UTC 2008


On Thursday 20 November 2008 00:20:52 Vladimir Dronnikov wrote:
> > > Using the subj from current SVN I get the patches which do not
> > > substitute /dev/null for missing or being deleted files.
> > > Is it intended?
> >
> > Are you saying that older versions were doing this, and now it broke?
>
> Nope. I simply did not pay attention. BB generated diffs do not apply
> cleanly by Rob's toybox' patch. I use his toolchain in my building tree.
> Although I can use vanilla patch the question is whether BB diff does
> things right?

The susv3 spec for patch is useless, since it doesn't describe -u:
http://www.opengroup.org/onlinepubs/009695399/utilities/patch.html

So I was going by the man page for the gnu version, which says:

>        You  can create a file by sending out a diff that compares /dev/null
> or an empty file dated the Epoch (1970-01-01 00:00:00 UTC) to the file you
> want to create.  This only works if the file you want to create doesn’t
> exist already in the target directory.

(Comparing for equality with the epoch turns out to be slightly fiddly because 
time zones usually make it show up as dec 31 1969 instead.  *Shrug*)

Rob



More information about the busybox mailing list