Bug#883913: pylint: please make the build reproducible
Chris Lamb
lamby at debian.org
Sat Dec 9 09:44:07 UTC 2017
Source: pylint
Version: 1.7.4-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: randomness fileordering
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed
that pylint could not be built reproducibly.
This is due to the documentation generator iterating over the filesystem
in a nondeterminstic order and then iterating over an internal,
nondeterminstic, data structure.
Patch attached.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
--- a/debian/patches/reproducible_build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/reproducible_build.patch 2017-12-09 09:40:39.047007768 +0000
@@ -0,0 +1,25 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2017-12-09
+
+--- pylint-1.7.4.orig/doc/exts/pylint_extensions.py
++++ pylint-1.7.4/doc/exts/pylint_extensions.py
+@@ -42,6 +42,7 @@ def builder_inited(app):
+ elif ext == '.rst':
+ doc_files['pylint.extensions.' + name] = os.path.join(ext_path,
+ filename)
++ modules.sort()
+ if not modules:
+ sys.exit("No Pylint extensions found?")
+
+--- pylint-1.7.4.orig/pylint/utils.py
++++ pylint-1.7.4/pylint/utils.py
+@@ -454,7 +454,7 @@ class MessagesHandlerMixIn(object):
+ print("Below is a list of all checkers and their features.", file=stream)
+ print("", file=stream)
+
+- for checker, info in six.iteritems(by_checker):
++ for checker, info in sorted(six.iteritems(by_checker)):
+ self._print_checker_doc(checker, info, stream=stream)
+
+ @staticmethod
--- a/debian/patches/series 2017-12-09 09:23:53.747933110 +0000
--- b/debian/patches/series 2017-12-09 09:33:04.808588763 +0000
@@ -1 +1,2 @@
doc_makefile_python3.patch
+reproducible_build.patch
More information about the Reproducible-bugs
mailing list