Skip to contentSkip to conversation

sstate: Ensure we sort the value used for SSTATETASKS for determinism

PATCH New Richard Purdie 1 participant 1 message May 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sstate: Ensure we sort the value used for SSTATETASKS for determinism

This avoids 'basehash changed' errors with python 3 but could break build determinism in general.

meta/classes/sstate.bbclass +1 -1
index 6491bad..5fca0ea 100644
@@ -95,7 +95,7 @@ python () {
         scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}"
         d.setVar('SSTATE_SCAN_CMD', scan_cmd)
 
-    unique_tasks = set((d.getVar('SSTATETASKS', True) or "").split())
+    unique_tasks = sorted(set((d.getVar('SSTATETASKS', True) or "").split()))
     d.setVar('SSTATETASKS', " ".join(unique_tasks))
     for task in unique_tasks:
         d.prependVarFlag(task, 'prefuncs', "sstate_task_prefunc ")