[bitbake-devel] [PATCH] data.py: sort exported variables

Juro Bystricky juro.bystricky at intel.com
Fri Mar 17 19:44:07 UTC 2017


Various run.do_xxx files export dozens of variables.
Presently they are in random order. Among other things,
this makes it difficult to compare two files for relevant changes.
This patch ensures they are enumerated/printed in a sorted
(alphabetical) order.

Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
---
 bitbake/lib/bb/data.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index 0f05b60..d145f1b 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -220,7 +220,7 @@ def emit_func(func, o=sys.__stdout__, d = init()):
     """Emits all items in the data store in a format such that it can be sourced by a shell."""
 
     keys = (key for key in d.keys() if not key.startswith("__") and not d.getVarFlag(key, "func", False))
-    for key in keys:
+    for key in sorted(keys):
         emit_var(key, o, d, False)
 
     o.write('\n')
-- 
2.7.4




More information about the bitbake-devel mailing list