Bug#923996: diffoscope: --exclude doesn't work too well with sub-archives

Mike Hommey mh+reportbug at glandium.org
Fri Mar 8 05:04:10 GMT 2019


Package: diffoscope
Version: 113
Severity: normal

Take the following testcase:

$ mkdir a b c
$ echo 0 > c/0
$ zip a/0.zip c/0
$ echo 1 > c/0
$ zip b/0.zip c/0
$ diffoscope a b --exclude-directory-metadata=recursive
--- a
+++ b
├── 0.zip
│ ├── c/0
│ │ @@ -1 +1 @@
│ │ -0
│ │ +1

The only way I found to exclude c/0 is: "--exclude c/0", which makes it
ignore under which archive it was found, so if there is, in fact,
another archive with the same path, both are excluded.

And because the result of "--exclude c/0" is that there is no content
difference found between the archives, diffoscope now thinks it should
display format-specific differences:

--- a
+++ b
├── 0.zip
│┄ Format-specific differences are supported for this file format but no file-specific differences were detected; falling back to a binary diff. file(1) reports: Zip archive data, at least v1.0 to extract
│ @@ -1,10 +1,10 @@
│ -00000000: 504b 0304 0a00 0000 0000 3170 684e 12cd  PK........1phN..
│ -00000010: 4a7e 0200 0000 0200 0000 0300 1c00 632f  J~............c/
│ +00000000: 504b 0304 0a00 0000 0000 3170 684e 53fc  PK........1phNS.
│ +00000010: 5167 0200 0000 0200 0000 0300 1c00 632f  Qg............c/
│  00000020: 3055 5409 0003 2ef7 815c 2ef7 815c 7578  0UT......\...\ux
│ -00000030: 0b00 0104 e803 0000 04e8 0300 0030 0a50  .............0.P
│ -00000040: 4b01 021e 030a 0000 0000 0031 7068 4e12  K..........1phN.
│ -00000050: cd4a 7e02 0000 0002 0000 0003 0018 0000  .J~.............
│ +00000030: 0b00 0104 e803 0000 04e8 0300 0031 0a50  .............1.P
│ +00000040: 4b01 021e 030a 0000 0000 0031 7068 4e53  K..........1phNS
│ +00000050: fc51 6702 0000 0002 0000 0003 0018 0000  .Qg.............
│  00000060: 0000 0001 0000 00a4 8100 0000 0063 2f30  .............c/0
│  00000070: 5554 0500 032e f781 5c75 780b 0001 04e8  UT......\ux.....
│  00000080: 0300 0004 e803 0000 504b 0506 0000 0000  ........PK......
│  00000090: 0100 0100 4900 0000 3f00 0000 0000       ....I...?.....

Mike


More information about the Reproducible-builds mailing list