Re: "Cannot represent change" error upon PNG file addition
Zoltan Ivanfi wrote:
Wouldn't the following simple solution work?
--- /usr/bin/dpkg-source 2004-11-11 21:15:52.000000000 +0100
+++ /home/ifi/bin/dpkg-source 2004-12-08 14:45:00.000000000 +0100
@@ -406,7 +406,7 @@
'--',"$ofnread","$dir/$fn"); &syserr("exec diff");
That's terrifying. I just tried diff -a on two PNG files and it worked
just fine. But will it always work? The diff format is to have a line
beginning with "-" or "+" followed with a line of data. Is there a limit
on line length? If not (and I don't think there is) then this trick
ought to work; either it will "-" one file and "+" the next (using the
"\ No newline at end of file" notation to denote the lack of "\n", or it
will diff one line up to the next "\n" and then begin again with a new +
or -. No data gets lost or mangled.
The diff is then gzip'd anyhow, so being 8-bit unclean shouldn't bother us.
It seems to me that this does work. Is there any counter-example?
PS. the patch man page suggests "diff -a --binary" and "patch --binary"
but that shouldn't matter unless Debian gets ported to VAX.