summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorJuro Bystricky <juro.bystricky@intel.com>2017-04-05 14:51:31 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-10 23:00:43 +0100
commit950be7ae8dd8f2413b091e6e5a071ad4d13c95e6 (patch)
tree737ecaacb3b6f827b0158c6574013cbfeeb4ac63 /meta/classes/license.bbclass
parentf91aedf6b5f2a76539760b1535ba427658bf77d7 (diff)
downloadpoky-950be7ae8dd8f2413b091e6e5a071ad4d13c95e6.tar.gz
license.bbclass: improve reproducibility
Two identical builds can end up having deploy/licenses folders that differ. This is observed in cases where there are several different license files of the same name in different folders, i.e. "COPYING". In those case we have to differentiate the files somehow and we do it via file expensions such as COPYING.0, COPYING.1. However, which file will get which extension is presently random. This means, for example, that COPYING.0 in one build is the same as COPYING.1 in the other (and vice versa). Although there is mothing wrong with this, for the sake of binary reproducibility it is preferable to have a deterministic outcome. (From OE-Core rev: 007ebc84979b1bc8b7520097793c7ab6d646c243) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 81458e797b..d4be478166 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -505,7 +505,7 @@ def find_license_files(d):
505 bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF'))) 505 bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF')))
506 # Add files from LIC_FILES_CHKSUM to list of license files 506 # Add files from LIC_FILES_CHKSUM to list of license files
507 lic_chksum_paths = defaultdict(OrderedDict) 507 lic_chksum_paths = defaultdict(OrderedDict)
508 for path, data in lic_chksums.items(): 508 for path, data in sorted(lic_chksums.items()):
509 lic_chksum_paths[os.path.basename(path)][data] = (os.path.join(srcdir, path), data[1], data[2]) 509 lic_chksum_paths[os.path.basename(path)][data] = (os.path.join(srcdir, path), data[1], data[2])
510 for basename, files in lic_chksum_paths.items(): 510 for basename, files in lic_chksum_paths.items():
511 if len(files) == 1: 511 if len(files) == 1: