]> code.ossystems Code Review - openembedded-core.git/commitdiff
util-linux: Fix reproducibility
authorSteve Sakoman <steve@sakoman.com>
Mon, 4 Oct 2021 14:35:55 +0000 (04:35 -1000)
committerSteve Sakoman <steve@sakoman.com>
Tue, 19 Oct 2021 14:04:49 +0000 (04:04 -1000)
Sort the list of files to ensure the pkgdata output is deterministic.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3a55194f90e11da5671b24391a4aaf2b86a8e1e6)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-core/util-linux/util-linux.inc

index af4c0b9974435c5cc83702095e5b97ca8e42b3b5..7b780352be5e9e2d9848c0142f7d53abb3572906 100644 (file)
@@ -59,12 +59,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)
 }