summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorAmanda Brindle <amanda.r.brindle@intel.com>2018-03-05 11:11:52 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-15 03:39:42 -0700
commit58b5f8a221a4f56909234a39fbce886c1e723aa5 (patch)
treed086ba5e92ecf821c7de40479c22e739b2ea4711 /bitbake/lib/bb/utils.py
parent04575dfdbc6997666c23336ef170a597517f4266 (diff)
downloadopenembedded-core-contrib-58b5f8a221a4f56909234a39fbce886c1e723aa5.tar.gz
bitbake: utils.py: Add option for explode_dep_versions2 to return unsorted
Before, explode_dep_versions2 would sort the OrderedDict before returning. This function will still sort the OrderedDict by default, but will now have the option to return the OrderedDict unsorted. This option will allow us to check if the order of the package list has changed. (Bitbake rev: 39d6a30a28f66c599e18beddbd847f40dcff623c) Signed-off-by: Amanda Brindle <amanda.r.brindle@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index c540b49cf6..8b739d7849 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -187,7 +187,7 @@ def explode_deps(s):
#r[-1] += ' ' + ' '.join(j)
return r
-def explode_dep_versions2(s):
+def explode_dep_versions2(s, *, sort=True):
"""
Take an RDEPENDS style string of format:
"DEPEND1 (optional version) DEPEND2 (optional version) ..."
@@ -250,7 +250,8 @@ def explode_dep_versions2(s):
if not (i in r and r[i]):
r[lastdep] = []
- r = collections.OrderedDict(sorted(r.items(), key=lambda x: x[0]))
+ if sort:
+ r = collections.OrderedDict(sorted(r.items(), key=lambda x: x[0]))
return r
def explode_dep_versions(s):