Bug#844111: python-defaults: please make the substvars reproducible

Chris Lamb lamby at debian.org
Sat Nov 12 15:25:48 UTC 2016


Source: python-defaults
Version: 2.7.11-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: toolchain
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that python-defaults generates substvars that are not reproducible

For example, this is in python-tgext.admin:

│   │   │   │ -Depends: python (>= 2.7), python (<< 2.8), python:any (>= 2.6.6-7~), python-pkg-resources, python-sprox, python-toscawidgets, python-turbogears2
│   │   │   │ +Depends: python (>= 2.7), python (<< 2.8), python:any (>= 2.6.6-7~), python-sprox, python-toscawidgets, python-pkg-resources, python-turbogears2

Patch attached. The equivalent patch is already in dh-python FYI.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
diff --git a/debpython/depends.py b/debpython/depends.py
index d46c896..be153b0 100644
--- a/debpython/depends.py
+++ b/debpython/depends.py
@@ -43,15 +43,15 @@ class Dependencies(object):
 
     def export_to(self, dh):
         """Fill in debhelper's substvars."""
-        for i in self.depends:
+        for i in sorted(self.depends):
             dh.addsubstvar(self.package, 'python:Depends', i)
-        for i in self.recommends:
+        for i in sorted(self.recommends):
             dh.addsubstvar(self.package, 'python:Recommends', i)
-        for i in self.suggests:
+        for i in sorted(self.suggests):
             dh.addsubstvar(self.package, 'python:Suggests', i)
-        for i in self.enhances:
+        for i in sorted(self.enhances):
             dh.addsubstvar(self.package, 'python:Enhances', i)
-        for i in self.breaks:
+        for i in sorted(self.breaks):
             dh.addsubstvar(self.package, 'python:Breaks', i)
         for i in self.rtscripts:
             dh.add_rtupdate(self.package, i)


More information about the Reproducible-builds mailing list