Hi Jean, Thanks for the tip on adding those quilt options to the configuration file. I've done a quick experiment and it seems to work.
On Tue, 13 Aug 2024, 14:23 Jean Delvare, <[email protected]> wrote: > Hi Aidan, > > On Fri, 2024-08-09 at 11:03 +0100, Aidan wrote: > > On Fri, 9 Aug 2024, 10:46 Jean Delvare, <[email protected]> wrote: > > > On Thu, 2024-08-08 at 09:26 +0100, Aidan wrote: > > > > I need to use quilt for patch binary files, however, quilt rejects > > > > this. > > > > > > > > Is this a deliberate decision or does it just need implemented? > > > > > > This is a technical limitation. Quilt relies on GNU patch to apply the > > > patches and GNU diff to generate them. GNU diff doesn't support binary > > > files. I don't think GNU patch supports binary files either, the manual > > > page mentions a binary mode but I seem to understand it's only about > > > text file line ending conversion, not actual binary files. > > > > I believe GNU patch and diff do work with binary files. > > I've just tested this and it works: > > > > diff --binary --text binary1 binary2 > mypatch > > > > patch binary1 < mypatch > > OK, this is news to me. Option --binary of GNU diff is undocumented (at > least in the versions I'm using, 3.6 and 3.10) so I'm not sure what it > does exactly. I suspect it simply avoids line end conversions, > similarly to what the GNU patch option does. If your binary files are > large, patches generated that way will be very large as well, as I > don't expect GNU diff to find any matching "line" so it will simply > include both files in their entirety in the patch. > > I think you should also pass option --binary to GNU patch to be on the > safe side. > > If the above commands work for the files you are dealing with, then you > may try adding the following to your ~/.quiltrc configuration file: > > QUILT_PATCH_OPTS="--binary" > QUILT_DIFF_OPTS="--binary --text" > > Maybe it will satisfy your need, but I can't promise anything. > > -- > Jean Delvare > SUSE L3 Support >
_______________________________________________ Quilt-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/quilt-dev
