diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-09 14:07:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-11 10:34:30 +0100 |
commit | 442acd2ea910609b4ad1d22a6522d3d9128c7100 (patch) | |
tree | 3b5fff7b8829e443865203d168de3def6a55bde7 /bitbake/lib/bb | |
parent | 3795f4d6a69dc4ba5208f1d05b89e65bc11d8a10 (diff) | |
download | poky-442acd2ea910609b4ad1d22a6522d3d9128c7100.tar.gz |
bitbake: lib/bb/utils.py: Fix explode_dep_versions2() determinism issue
When we pass data into explode_dep_versions2(), we need to result to be
able to be processed in a deterministic way so that we end up with
consistent hash values. This means we need an ordered structure rather
than an unordered one.
To do this, return an OrderedDict() rather than a dict().
(Bitbake rev: 0737e003ca549d08a7dfe13452ae982f2e11fecd)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 2abf518ece..0c553dd765 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -36,6 +36,7 @@ import traceback | |||
36 | import errno | 36 | import errno |
37 | import signal | 37 | import signal |
38 | import ast | 38 | import ast |
39 | import collections | ||
39 | from commands import getstatusoutput | 40 | from commands import getstatusoutput |
40 | from contextlib import contextmanager | 41 | from contextlib import contextmanager |
41 | from ctypes import cdll | 42 | from ctypes import cdll |
@@ -192,7 +193,7 @@ def explode_dep_versions2(s): | |||
192 | "DEPEND1 (optional version) DEPEND2 (optional version) ..." | 193 | "DEPEND1 (optional version) DEPEND2 (optional version) ..." |
193 | and return a dictionary of dependencies and versions. | 194 | and return a dictionary of dependencies and versions. |
194 | """ | 195 | """ |
195 | r = {} | 196 | r = collections.OrderedDict() |
196 | l = s.replace(",", "").split() | 197 | l = s.replace(",", "").split() |
197 | lastdep = None | 198 | lastdep = None |
198 | lastcmp = "" | 199 | lastcmp = "" |