]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_deb.bbclass/package_ipk.bbclass: sort RPROVIDES
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 18 Jul 2016 03:32:46 +0000 (20:32 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Jul 2016 22:46:59 +0000 (23:46 +0100)
The dict.fromkeys() creates a dict without order, there might be a
problem when build the same recipe again, for example:

- First build of make:
  Provides: es-translation, make-locale
- Second build of acl:
  Provides: make-locale, es-translation

They are exactly the same Provides, but tools like "diff" doesn't think
so. Sort RPROVIDES will fix the problem.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/package_deb.bbclass
meta/classes/package_ipk.bbclass

index 6db69332e2a625a9efb7030c08313c84cce33ea5..4e5dc1285086d1a9ac7146b505260c4897f2040c 100644 (file)
@@ -52,6 +52,7 @@ python do_package_deb () {
     import re, copy
     import textwrap
     import subprocess
+    import collections
 
     oldcwd = os.getcwd()
 
@@ -247,6 +248,7 @@ python do_package_deb () {
         debian_cmp_remap(rsuggests)
         # Deliberately drop version information here, not wanted/supported by deb
         rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or ""), [])
+        rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0]))
         debian_cmp_remap(rprovides)
         rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
         debian_cmp_remap(rreplaces)
index 1b5f4f59e37fcc2568134f7fee34cc26c7d12a72..e32b9cb5fd7410ff37112e66ab4eca82fecad5f4 100644 (file)
@@ -20,6 +20,7 @@ python do_package_ipk () {
     import re, copy
     import textwrap
     import subprocess
+    import collections
 
     oldcwd = os.getcwd()
 
@@ -192,6 +193,7 @@ python do_package_ipk () {
         debian_cmp_remap(rsuggests)
         # Deliberately drop version information here, not wanted/supported by ipk
         rprovides = dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES", True) or ""), [])
+        rprovides = collections.OrderedDict(sorted(rprovides.items(), key=lambda x: x[0]))
         debian_cmp_remap(rprovides)
         rreplaces = bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES", True) or "")
         debian_cmp_remap(rreplaces)