Source: python-genpy
Version: 0.5.7-3
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: toolchain randomness
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi,

Whilst working on the "reproducible builds" effort [0], we noticed that 
python-genpy generates output with a non-determistic order.

The attached patch removes this randomness from the build system. Once applied, 
packages using python-genpy can be built reproducibly using our reproducible 
toolchain.

 [0] https://wiki.debian.org/ReproducibleBuilds


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/src/genpy/generate_initpy.py b/src/genpy/generate_initpy.py
index 2774b18..a6bfecf 100644
--- a/src/genpy/generate_initpy.py
+++ b/src/genpy/generate_initpy.py
@@ -48,7 +48,7 @@ def write_modules(outdir):
         return 0
     types_in_dir = set([f[1:-3] for f in os.listdir(outdir)
                      if f.endswith('.py') and f != '__init__.py'])
-    generated_modules = [_module_name(f) for f in types_in_dir]
+    generated_modules = [_module_name(f) for f in sorted(types_in_dir)]
     write_module(outdir, generated_modules)
     return 0
 
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to