#988488 diffoscope: allow comparing directories with container formats (tar/ZIP/ISO etc)

#988488#5
Date:
2021-05-14 03:41:25 UTC
From:
To:
When comparing directories and files that are essentially directories
serialised into a file (such as tar, ZIP, ISO etc), currently
diffoscope just says one is a file while one is a directory.

   $ rm -rf ./* ; mkdir foo ; echo foo > foo/bar ; tar acf foo.tar foo ; echo bar >> foo/bar
   $ diffoscope foo foo.tar
   --- foo
   +++ foo.tar
   @@ -1 +1 @@
   -type: directory
   +type: file

diffoscope can already compare two directories, or two tar files or a
zip file and a tar file, so it would be useful if it could compare a
directory with a file in one of the many types of container formats.

This would be useful in many situations but especially for the
situation where dpkg-source reports a change to a file in the working
directory compared to the upstream tarball, but the change isn't
obvious from the output and should not be present in theory.

   dpkg-source: error: cannot represent change to foo.exe: binary file contents changed

#988488#10
Date:
2021-05-14 09:37:45 UTC
From:
To:
forwarded 988488 https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/256
thanks

Hey pabs,

That would be neat, especially in the Debian example you give. I've
gone ahead and forwarded this "upstream" here to make it easier to
prioritise, etc.. Feel free to add any more comments there.

https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/256


Regards,