mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
update-alternatives: Fix determinism issue
getVarFlags returns a dict and there is therefore no sort order. This means the order of the X_VARDEPS_X variables can change and hence the task checksums can change. This can lead to rebuilds of any parts of the system using update-alternatives and their dependees. This is a particular issue under python v3. Add in a sort to make the order of the variables deterministic. (From OE-Core rev: ecd1bfed5534f83b775a6c79092c04bd13c3af0a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -71,14 +71,14 @@ def gen_updatealternativesvardeps(d):
|
|||||||
|
|
||||||
# First compute them for non_pkg versions
|
# First compute them for non_pkg versions
|
||||||
for v in vars:
|
for v in vars:
|
||||||
for flag in (d.getVarFlags(v) or {}):
|
for flag in sorted((d.getVarFlags(v) or {}).keys()):
|
||||||
if flag == "doc" or flag == "vardeps" or flag == "vardepsexp":
|
if flag == "doc" or flag == "vardeps" or flag == "vardepsexp":
|
||||||
continue
|
continue
|
||||||
d.appendVar('%s_VARDEPS' % (v), ' %s:%s' % (flag, d.getVarFlag(v, flag, False)))
|
d.appendVar('%s_VARDEPS' % (v), ' %s:%s' % (flag, d.getVarFlag(v, flag, False)))
|
||||||
|
|
||||||
for p in pkgs:
|
for p in pkgs:
|
||||||
for v in vars:
|
for v in vars:
|
||||||
for flag in (d.getVarFlags("%s_%s" % (v,p)) or {}):
|
for flag in sorted((d.getVarFlags("%s_%s" % (v,p)) or {}).keys()):
|
||||||
if flag == "doc" or flag == "vardeps" or flag == "vardepsexp":
|
if flag == "doc" or flag == "vardeps" or flag == "vardepsexp":
|
||||||
continue
|
continue
|
||||||
d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False)))
|
d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False)))
|
||||||
|
|||||||
Reference in New Issue
Block a user