summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-06-03 15:29:47 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-04 08:09:42 (GMT)
commit0965f4894967266e51f60f44dd2689845a380a54 (patch)
tree0250f580cf446241c7cc06ea8b6f53561441058e /meta/classes/package.bbclass
parent5eb1d8b63f35abb3db2b701990b59d78059456a8 (diff)
downloadpoky-0965f4894967266e51f60f44dd2689845a380a54.tar.gz
classes/package: Sort ELF file list
Sorts the list of detected ELF files by path before processing. This ensures that when multiple files are hardlinked together the first one found is always the same. This is required to have reproducible builds. (From OE-Core rev: de86bfeda6e3845336a0b56c883b49219967128f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 4c0a859..0694855 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1005,6 +1005,12 @@ python split_and_strip_files () {
1005 symlinks[file] = target 1005 symlinks[file] = target
1006 1006
1007 results = oe.utils.multiprocess_launch(oe.package.is_elf, checkelf.keys(), d) 1007 results = oe.utils.multiprocess_launch(oe.package.is_elf, checkelf.keys(), d)
1008
1009 # Sort results by file path. This ensures that the files are always
1010 # processed in the same order, which is important to make sure builds
1011 # are reproducible when dealing with hardlinks
1012 results.sort(key=lambda x: x[0])
1013
1008 for (file, elf_file) in results: 1014 for (file, elf_file) in results:
1009 # It's a file (or hardlink), not a link 1015 # It's a file (or hardlink), not a link
1010 # ...but is it ELF, and is it already stripped? 1016 # ...but is it ELF, and is it already stripped?