diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-29 22:39:11 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-02 23:26:54 +0100 |
commit | 8a181dc8f3c8c9c9885ea3011cb234321a296d92 (patch) | |
tree | 2bbe7faafd5353bc132654b7972d2b66b28e7752 /lib/bb/data.py | |
parent | a144178584394ea0700ffc2f2bfac94e8690effc (diff) | |
download | bitbake-8a181dc8f3c8c9c9885ea3011cb234321a296d92.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r-- | lib/bb/data.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py index 97022853c..9d18b1e2b 100644 --- a/lib/bb/data.py +++ b/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)) |