summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-11-02 14:59:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-06 23:35:36 +0000
commite35775c598b7db9f3d93e0004b0f7a0dc9028284 (patch)
tree2e30aa29a762119150852fbd3ea329548f4d5e97 /meta/classes/license.bbclass
parentd02416e29302810ec3653d64108170aa27b60c48 (diff)
downloadpoky-e35775c598b7db9f3d93e0004b0f7a0dc9028284.tar.gz
classes/license: copy licenses even if there are no checksummed files
Previously do_populate_lic would bail writing the license files (such as the MIT license text) to deploy/licenses/${PN}/ if there were no files listed in LIC_FILES_CHKSUM. In general this isn't a problem since LIC_FILES_CHKSUM was effectively a required field, and for packages which don't have traditional content was generally set to a separate license such as ${COREBASE}/meta/COPYING.MIT. However LIC_FILES_CHKSUM is now only required if there are sources in SRC_URI, so oe-core b18fa5f removed these now redundant values. The unexpected side effect of this is that that recipes that generate their content (such as os-release) or are otherwise "interesting" (such as perf) don't have their license files copied over, resulting in warnings from do_rootfs. Resolve this by not returning early if LIC_FILES_CHKSUM is empty, and always copy the references license files. (From OE-Core rev: 94f5ac0651249cb98fb8d1308b7c0d10605d5a1e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass8
1 files changed, 1 insertions, 7 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 660b85f619..afcfbfc038 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -390,7 +390,7 @@ def find_license_files(d):
390 from collections import defaultdict, OrderedDict 390 from collections import defaultdict, OrderedDict
391 391
392 # All the license files for the package 392 # All the license files for the package
393 lic_files = d.getVar('LIC_FILES_CHKSUM', True) 393 lic_files = d.getVar('LIC_FILES_CHKSUM', True) or ""
394 pn = d.getVar('PN', True) 394 pn = d.getVar('PN', True)
395 # The license files are located in S/LIC_FILE_CHECKSUM. 395 # The license files are located in S/LIC_FILE_CHECKSUM.
396 srcdir = d.getVar('S', True) 396 srcdir = d.getVar('S', True)
@@ -469,12 +469,6 @@ def find_license_files(d):
469 if not generic_directory: 469 if not generic_directory:
470 bb.fatal("COMMON_LICENSE_DIR is unset. Please set this in your distro config") 470 bb.fatal("COMMON_LICENSE_DIR is unset. Please set this in your distro config")
471 471
472 if not lic_files:
473 # No recipe should have an invalid license file. This is checked else
474 # where, but let's be pedantic
475 bb.note(pn + ": Recipe file does not have license file information.")
476 return lic_files_paths
477
478 for url in lic_files.split(): 472 for url in lic_files.split():
479 try: 473 try:
480 (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url) 474 (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)