summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-07-17 20:32:46 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-25 23:46:59 +0100
commit3506172d7d9f8d92362b6ebb75582b7c3e662dae (patch)
treefd480fcdd562fbe5e70c63eb25d9dca8c6d5f180
parentc92152e521a9f96a741eccd4a4bf5ddfbd59a7ae (diff)
downloadopenembedded-core-contrib-3506172d7d9f8d92362b6ebb75582b7c3e662dae.tar.gz
openembedded-core-contrib-3506172d7d9f8d92362b6ebb75582b7c3e662dae.tar.bz2
openembedded-core-contrib-3506172d7d9f8d92362b6ebb75582b7c3e662dae.zip
package_deb.bbclass/package_ipk.bbclass: sort RPROVIDES
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>
-rw-r--r--meta/classes/package_deb.bbclass2
-rw-r--r--meta/classes/package_ipk.bbclass2
2 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 6db69332e2..4e5dc12850 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -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)
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 1b5f4f59e3..e32b9cb5fd 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -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)