Commit b57219cf authored by Chris Lamb's avatar Chris Lamb 💬 Committed by Ole Streicher

Use name-based sorting for the recipes to ensure reproducible build

To: submit@bugs.debian.org
Subject: cpl-plugin-visir: please make the build reproducible
Date: Tue, 13 Feb 2018 10:45:20 +0000

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that cpl-plugin-visir could not be built reproducibly.

I think the index-based sorting is broken for some reason (probably
not reliably sorted prior to this) so moving to name-based in the
attached patch.

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

Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby@debian.org / chris-lamb.co.uk
       `-
parent 1e245584
......@@ -142,8 +142,7 @@ recipes = [ cpl.Recipe(name) for name, version in cpl.Recipe.list() ]
oca = file(os.path.join("calib", "gasgano", "config", pipeline + ".oca")).read()
oca = oca[oca.find("action"):]
recipes_oca = [recipe for recipe in recipes if recipe.__name__ in oca]
index = [ oca.find(recipe.__name__) for recipe in recipes_oca ]
recipes_oca = [r for (i, r) in sorted(zip(index, recipes_oca))]
recipes_oca.sort(key = lambda x: x.__name__)
recipes_x = [recipe for recipe in recipes if not recipe.__name__ in oca]
recipes_x.sort(key = lambda x: x.__name__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment