summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@gmail.com>2019-01-10 23:45:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 11:21:58 +0000
commitc99cb0bbb78089d1d15c4c8563a71db0df1cb0da (patch)
tree6dcef372f2af500f71e4c6f070cb985781ce7001
parentc526576a319307388b31521ff560f1a93066188c (diff)
downloadopenembedded-core-contrib-c99cb0bbb78089d1d15c4c8563a71db0df1cb0da.tar.gz
openembedded-core-contrib-c99cb0bbb78089d1d15c4c8563a71db0df1cb0da.tar.bz2
openembedded-core-contrib-c99cb0bbb78089d1d15c4c8563a71db0df1cb0da.zip
package.bbclass: Make package output files more deterministic
Observing depsig.do_package for packages inbetween rebuilds indicated that the following variables/files content was changing order randomly. Make them deterministic by sorting the output: RDEPENDS_<pkg> RRECOMMENDS_<pkg> FILERDEPENDSFLIST_<pkg> packages-split/<pkg>.shlibdeps The following variable was not observed to change, but it is assumed that the same situation can occur, so do the same sorting for consistency: FILERPROVIDESFLIST_<pkg> Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package.bbclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index be316510a6..7a7bc9e2f0 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1562,12 +1562,12 @@ python package_do_filedeps() {
if pkg not in requires_files:
requires_files[pkg] = []
- for file in provides:
+ for file in sorted(provides):
provides_files[pkg].append(file)
key = "FILERPROVIDES_" + file + "_" + pkg
d.appendVar(key, " " + " ".join(provides[file]))
- for file in requires:
+ for file in sorted(requires):
requires_files[pkg].append(file)
key = "FILERDEPENDS_" + file + "_" + pkg
d.appendVar(key, " " + " ".join(requires[file]))
@@ -1868,7 +1868,7 @@ python package_do_shlibs() {
os.remove(deps_file)
if len(deps):
fd = open(deps_file, 'w')
- for dep in deps:
+ for dep in sorted(deps):
fd.write(dep + '\n')
fd.close()
}
@@ -1989,7 +1989,7 @@ python read_shlibdeps () {
packages = d.getVar('PACKAGES').split()
for pkg in packages:
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg) or "")
- for dep in pkglibdeps[pkg]:
+ for dep in sorted(pkglibdeps[pkg]):
# Add the dep if it's not already there, or if no comparison is set
if dep not in rdepends:
rdepends[dep] = []
@@ -2022,7 +2022,7 @@ python package_depchains() {
#bb.note('depends for %s is %s' % (base, depends))
rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "")
- for depend in depends:
+ for depend in sorted(depends):
if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
#bb.note("Skipping %s" % depend)
continue
@@ -2043,7 +2043,7 @@ python package_depchains() {
#bb.note('rdepends for %s is %s' % (base, rdepends))
rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "")
- for depend in rdepends:
+ for depend in sorted(rdepends):
if depend.find('virtual-locale-') != -1:
#bb.note("Skipping %s" % depend)
continue