summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-09 14:12:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-11 10:33:42 +0100
commitf49be7e7c9558de5a5aa3321bec3e92aa3bf5e8c (patch)
tree8bd82a576bbac3d723ae2811ed3b92ea321ac0c4 /meta/classes
parent8a88c5696840d8ee725743cabbf838f94be21498 (diff)
downloadpoky-f49be7e7c9558de5a5aa3321bec3e92aa3bf5e8c.tar.gz
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>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/update-alternatives.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 70a818572c..1fdd681315 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -71,14 +71,14 @@ def gen_updatealternativesvardeps(d):
71 71
72 # First compute them for non_pkg versions 72 # First compute them for non_pkg versions
73 for v in vars: 73 for v in vars:
74 for flag in (d.getVarFlags(v) or {}): 74 for flag in sorted((d.getVarFlags(v) or {}).keys()):
75 if flag == "doc" or flag == "vardeps" or flag == "vardepsexp": 75 if flag == "doc" or flag == "vardeps" or flag == "vardepsexp":
76 continue 76 continue
77 d.appendVar('%s_VARDEPS' % (v), ' %s:%s' % (flag, d.getVarFlag(v, flag, False))) 77 d.appendVar('%s_VARDEPS' % (v), ' %s:%s' % (flag, d.getVarFlag(v, flag, False)))
78 78
79 for p in pkgs: 79 for p in pkgs:
80 for v in vars: 80 for v in vars:
81 for flag in (d.getVarFlags("%s_%s" % (v,p)) or {}): 81 for flag in sorted((d.getVarFlags("%s_%s" % (v,p)) or {}).keys()):
82 if flag == "doc" or flag == "vardeps" or flag == "vardepsexp": 82 if flag == "doc" or flag == "vardeps" or flag == "vardepsexp":
83 continue 83 continue
84 d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False))) 84 d.appendVar('%s_VARDEPS_%s' % (v,p), ' %s:%s' % (flag, d.getVarFlag('%s_%s' % (v,p), flag, False)))