Skip to contentSkip to conversation

data: Make expandKeys deterministic

PATCH New Richard Purdie 1 participant 1 message May 27, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 data: Make expandKeys deterministic

At least in theory, the order the keys are expanded in can make a difference, particularly if there is key overlap.

We also want to ensure that any underlying base key is processed before any overridden version of that variable (FOO before FOO_x) which helps the update_data removal code I've been testing.

bitbake/lib/bb/data.py +1 -1
index 439c365..84f5355 100644
@@ -159,7 +159,7 @@ def expandKeys(alterdata, readdata = None):
 
     # These two for loops are split for performance to maximise the
     # usefulness of the expand cache
-    for key in todolist:
+    for key in sorted(todolist):
         ekey = todolist[key]
         newval = alterdata.getVar(ekey, 0)
         if newval is not None:
Signature · 1 line
cgit v0.10.2