bugQuilt - Bugs: bug #55815, Does not deal with binary files

 
 

bug #55815: Does not deal with binary files

Submitter:  Filipus Klutiero <chealer>
Submitted:  Sat 02 Mar 2019 09:05:31 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 11 Apr 2023 12:05:55 PM UTC, comment #1: 

Quilt can only deal with whatever both "patch" and "diff" can deal with. While "GNU diff" can indeed tell whether 2 binary files are identical or not, it can't represent the actual difference, so we can't store that difference in a patch file. And patch files are the key philosophical concept of quilt. We don't want to store extra data outside of these patch files.

So from my perspective (and the previous discussions on this topic, which you mentioned, went in the same direction as far as I can tell), quilt will support binary files when both GNU patch and GNU diff support binary files. Quilt is only an automation front-end to these tools, so extending the patch format to be able to deal with binary files is out of our hands.

Jean Delvare <khali>
Group administrator
Sat 02 Mar 2019 09:05:31 PM UTC, original submission:  

Quilt 0.65 does not deal with binary files. It refuses to create a patch when a binary file is modified. For example:
$ export LANG=C
chealer@debian:~$ mkdir binaryTest
chealer@debian:~$ cd binaryTest/
chealer@debian:~/binaryTest$ cp /usr/share/pixmaps/debian-logo.png .
chealer@debian:~/binaryTest$ quilt new test.diff
Patch patches/test.diff is now on top
chealer@debian:~/binaryTest$ quilt series
patches/test.diff
chealer@debian:~/binaryTest$ quilt add debian-logo.png
File debian-logo.png added to patch patches/test.diff
chealer@debian:~/binaryTest$ sed -i 's/PNG/PNGfoo/g' debian-logo.png
chealer@debian:~/binaryTest$ quilt refresh
Diff failed on file 'debian-logo.png', aborting
chealer@debian:~/binaryTest$

This occurs no matter what the new file is, as long as the initial file is binary (so changing the file to a symlink will not workaround). Presumably, as long as either the initial file or the final file are binary, refresh fails.

This limitation appears to be somewhat intentional: http://git.savannah.nongnu.org/cgit/quilt.git/commit/?id=20f06212baced666027131555ad4c834d8e4b232

Here are a couples discussions on this issue:
https://lists.nongnu.org/archive/html/quilt-dev/2007-01/msg00001.html
https://lists.gnu.org/archive/html/quilt-dev/2012-11/msg00007.html

I cannot tell if this is still waiting for a change to GNU patch, but according to https://www.gnu.org/software/diffutils/manual/html_node/Binary.html#Binary binary appears to be somewhat supported nowadays.

This constitutes a high importance issue for us.

Filipus Klutiero <chealer>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by khali (Posted a comment)
  • -email is unavailable- added by chealer (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code