[gnome-continuous-yocto/gnomeostree-3.28-rocko: 179/8267] bitbake: lib/bb/utils.py: Fix explode_dep_versions2() determinism issue
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 179/8267] bitbake: lib/bb/utils.py: Fix explode_dep_versions2() determinism issue
- Date: Sat, 16 Dec 2017 20:03:51 +0000 (UTC)
commit 442acd2ea910609b4ad1d22a6522d3d9128c7100
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Mon May 9 14:07:17 2016 +0100
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>
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 2abf518..0c553dd 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -36,6 +36,7 @@ import traceback
import errno
import signal
import ast
+import collections
from commands import getstatusoutput
from contextlib import contextmanager
from ctypes import cdll
@@ -192,7 +193,7 @@ def explode_dep_versions2(s):
"DEPEND1 (optional version) DEPEND2 (optional version) ..."
and return a dictionary of dependencies and versions.
"""
- r = {}
+ r = collections.OrderedDict()
l = s.replace(",", "").split()
lastdep = None
lastcmp = ""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]