[bitbake-devel] [PATCH 1/1] lib/bb/utils.py: return sorted OrderedDict in explode_dep_versions2
Robert Yang
liezhi.yang at windriver.com
Mon Jul 18 03:42:51 UTC 2016
The OrderedDict's item is sorted by insertion order, there might be a
problem when build the same recipe again, for example:
- First build of acl:
Depends: libattr1 (>= 2.4.47), libc6 (>= 2.24)
- Second build of acl:
Depends: libc6 (>= 2.24), libattr1 (>= 2.4.47)
They are exactly the same depends, but tools like "diff" doesn't think
so. Return sorted OrderedDict will fix the problem.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
bitbake/lib/bb/utils.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 0a1bf68..12f2aef 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -250,6 +250,7 @@ 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]))
return r
def explode_dep_versions(s):
--
2.9.0
More information about the bitbake-devel
mailing list