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:35:56 +0000
commit889d9e037fe426e8d2ee12af9500627c23dae7b0 (patch)
tree348e8758dd627ce6569d4a8c6c1516be9cc7d168
parent1b15b02b119221791f564ea94987336fbf00ca2c (diff)
downloadpoky-889d9e037fe426e8d2ee12af9500627c23dae7b0.tar.gz
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> (From OE-Core rev: c99cb0bbb78089d1d15c4c8563a71db0df1cb0da) 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() {
1562 if pkg not in requires_files: 1562 if pkg not in requires_files:
1563 requires_files[pkg] = [] 1563 requires_files[pkg] = []
1564 1564
1565 for file in provides: 1565 for file in sorted(provides):
1566 provides_files[pkg].append(file) 1566 provides_files[pkg].append(file)
1567 key = "FILERPROVIDES_" + file + "_" + pkg 1567 key = "FILERPROVIDES_" + file + "_" + pkg
1568 d.appendVar(key, " " + " ".join(provides[file])) 1568 d.appendVar(key, " " + " ".join(provides[file]))
1569 1569
1570 for file in requires: 1570 for file in sorted(requires):
1571 requires_files[pkg].append(file) 1571 requires_files[pkg].append(file)
1572 key = "FILERDEPENDS_" + file + "_" + pkg 1572 key = "FILERDEPENDS_" + file + "_" + pkg
1573 d.appendVar(key, " " + " ".join(requires[file])) 1573 d.appendVar(key, " " + " ".join(requires[file]))
@@ -1868,7 +1868,7 @@ python package_do_shlibs() {
1868 os.remove(deps_file) 1868 os.remove(deps_file)
1869 if len(deps): 1869 if len(deps):
1870 fd = open(deps_file, 'w') 1870 fd = open(deps_file, 'w')
1871 for dep in deps: 1871 for dep in sorted(deps):
1872 fd.write(dep + '\n') 1872 fd.write(dep + '\n')
1873 fd.close() 1873 fd.close()
1874} 1874}
@@ -1989,7 +1989,7 @@ python read_shlibdeps () {
1989 packages = d.getVar('PACKAGES').split() 1989 packages = d.getVar('PACKAGES').split()
1990 for pkg in packages: 1990 for pkg in packages:
1991 rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg) or "") 1991 rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg) or "")
1992 for dep in pkglibdeps[pkg]: 1992 for dep in sorted(pkglibdeps[pkg]):
1993 # Add the dep if it's not already there, or if no comparison is set 1993 # Add the dep if it's not already there, or if no comparison is set
1994 if dep not in rdepends: 1994 if dep not in rdepends:
1995 rdepends[dep] = [] 1995 rdepends[dep] = []
@@ -2022,7 +2022,7 @@ python package_depchains() {
2022 #bb.note('depends for %s is %s' % (base, depends)) 2022 #bb.note('depends for %s is %s' % (base, depends))
2023 rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "") 2023 rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "")
2024 2024
2025 for depend in depends: 2025 for depend in sorted(depends):
2026 if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'): 2026 if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
2027 #bb.note("Skipping %s" % depend) 2027 #bb.note("Skipping %s" % depend)
2028 continue 2028 continue
@@ -2043,7 +2043,7 @@ python package_depchains() {
2043 #bb.note('rdepends for %s is %s' % (base, rdepends)) 2043 #bb.note('rdepends for %s is %s' % (base, rdepends))
2044 rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "") 2044 rreclist = bb.utils.explode_dep_versions2(d.getVar('RRECOMMENDS_' + pkg) or "")
2045 2045
2046 for depend in rdepends: 2046 for depend in sorted(rdepends):
2047 if depend.find('virtual-locale-') != -1: 2047 if depend.find('virtual-locale-') != -1:
2048 #bb.note("Skipping %s" % depend) 2048 #bb.note("Skipping %s" % depend)
2049 continue 2049 continue