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().
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
import errno
import signal
import ast
+import collections
from commands import getstatusoutput
from contextlib import contextmanager
from ctypes import cdll
"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 = ""