[PATCH] reproducible Debian: Reverse Python 2.x dict order in the second build.

Chris Lamb lamby at debian.org
Sun Feb 12 21:08:19 UTC 2017


Holger Levsen wrote:

> i'm confused: uploaded what to where?
[…]
> the commit has a little too little information why this is useful

Updated commit to cover both concerns:

  commit a48e8e4685c204bea66d440014687ef662fdfcc5
  Author: Chris Lamb <lamby at debian.org>
  Date:   Mon Feb 13 10:00:18 2017 +1300
  
      reproducible Debian: Reverse Python 2.x dict order in the second build.
      
      We would like to find any code that is relying on non-determinstic or
      undefined behaviour. In Python 2.x, this includes dict ordering.
      
      It would therefore be convenient to be able to specify an environment
      variable that would reverse the usual ordering; we would then run a build
      of packages both with and without this flag and compare the resulting
      binaries as before.
      
      I wrote a patch for both 3.x and 2.x but they are unlikely to be accepted
      upstream (and the the 3.x one may be meaningless due to language changes),
      hence uploading to our custom reproducible toolchain.
      
      This change to Jenkins enables the "PYTHONREVERSEDICTKEYORDER" behaviour in
      our second build. It changes the behaviour of:
      
        * for x in d:
        * d.popitem()
        * d.items() & d.iteritems()
        * d.values() & d.itervalues()
        * print(d)
        * repr(dx)
        * PyDict_Next & _PyDict_Next
      
      It does not change the behaviour of collections.OrderedDict.
      
      Signed-off-by: Chris Lamb <lamby at debian.org>
  
   bin/reproducible_build.sh  | 1 +
   bin/reproducible_common.sh | 1 +
   2 files changed, 2 insertions(+)


You can also merge from the "export-PYTHONREVERSEDICTKEYORDER-pbuilderrc" branch of
https://github.com/lamby/jenkins.debian.net if that is more convenient.



Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-reproducible-Debian-Reverse-Python-2.x-dict-order-in.patch
Type: text/x-patch
Size: 2490 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20170213/775b2ee5/attachment.bin>


More information about the Reproducible-builds mailing list