From 75b79d5c056b5abb44c546af773e3431d4c09476 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 29 Sep 2021 22:39:11 +0100 Subject: bitbake: data: Ensure functions are defined in a deterministic order When writing functions into shell scripts, write then in a deterministic order. This is unlikely to affect anything at runtime but it does change the signatures of the generated useradd postinst scripts in OE-Core and is a good thing to be consistent about in general. (Bitbake rev: 8a181dc8f3c8c9c9885ea3011cb234321a296d92) Signed-off-by: Richard Purdie --- bitbake/lib/bb/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index 97022853ca..9d18b1e2bf 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py @@ -226,7 +226,7 @@ def emit_func(func, o=sys.__stdout__, d = init()): deps = newdeps seen |= deps newdeps = set() - for dep in deps: + for dep in sorted(deps): if d.getVarFlag(dep, "func", False) and not d.getVarFlag(dep, "python", False): emit_var(dep, o, d, False) and o.write('\n') newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep)) -- cgit v1.2.3-54-g00ecf