Source: ros-genpy
Version: 0.6.9-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: randomness toolchain
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
ros-genpy generates unreproducible Python code output. This is
currently affecting at least three source packages in Debian unstable.

Patch attached that ensures that the "struct" code stanzas are
emitted in a deterministic order.

  [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
diff --git a/src/genpy/generator.py b/src/genpy/generator.py
index b08f04c..ff1c8d0 100644
--- a/src/genpy/generator.py
+++ b/src/genpy/generator.py
@@ -891,7 +891,7 @@ def msg_generator(msg_context, spec, search_path):
     yield '    global _struct_I'
     yield '    return _struct_I'
     patterns = get_patterns()
-    for p in set(patterns):
+    for p in sorted(set(patterns)):
         # I patterns are already optimized
         if p == 'I':
             continue
-- 
debian-science-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to