util-linux: Fix reproducibility

Sort the list of files to ensure the pkgdata output is deterministic.

(From OE-Core rev: 82e683f8f9ae630dea46ec6be6e636e498579835)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2021-09-30 01:46:45 +01:00
parent 86125379b2
commit 3539c214dd

View File

@@ -37,12 +37,13 @@ python util_linux_binpackages () {
continue
pkg = os.path.basename(os.readlink(file))
extras[pkg] = extras.get(pkg, '') + ' ' + file.replace(dvar, '', 1)
extras.setdefault(pkg, [])
extras[pkg].append(file.replace(dvar, '', 1))
pn = d.getVar('PN')
for pkg, links in extras.items():
of = d.getVar('FILES:' + pn + '-' + pkg)
links = of + links
links = of + " " + " ".join(sorted(links))
d.setVar('FILES:' + pn + '-' + pkg, links)
}