[diffoscope] [Reproducible-builds] Support for --ignore-profile flag in diffoscope

Ximin Luo infinity0 at debian.org
Fri May 13 14:47:21 CEST 2016


Jérémy Bobbio:
> Ximin Luo:
>> Concretely I have some suggestions:
>>
>> 1. instead of calling this "ignore" we call it "hide". and instead of
>> "irrelevant" we say "common"/"minor"/"known"
> 
> Great suggestions! :)
> 
>> 2. diffoscope --ignore-* (or --hide-*) MUST NOT return 0 or otherwise
>> give the impression that two non-identical files are the same, even if
>> all differences are "hidden". It should report "n differences hidden".
> 
> There's a tradeoff here: you don't really know how many differences are
> going to be hidden until you've computed them, and that might be costly.
> 
> Use case: Jane is trying to understand if her patch removing __TIME__
> from the source code is enough to make the binary reproducible. As she
> knows how this affect the binary, she get faster results and avoid
> clutter by adding the flag `--hide=debug-symbols` or
> `--hide-pattern='*.debug'`.
> 
> I'm writing “faster results” because we can avoid unpacking the debug
> symbols and comparing them which are costly operations.
> 
> If we display “n differences hidden”, then we always have to compare
> everything…
> 

How about having two types of expression:

--hide=<expression that describes a diff>

  - can't affect the exit code, which still represents bitwise sameness
  - have to calculate the diff, and the expression describes which categories of diffs to hide

--assume-same=<expression that describes an input part>

  - could affect the exit code (perhaps, I'm still not too convinced by this)
  - diffoscope skips entirely over this part of the input, like "debug symbols" or "headers". we could support syntax like "* except debug"

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.reproducible-builds.org/pipermail/diffoscope/attachments/20160513/12a6b080/attachment.sig>


More information about the diffoscope mailing list