summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-08-03 16:32:14 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-25 22:54:49 +0100
commit831e98325195f5631b977365fd61c3910a2c23a5 (patch)
tree989cebab458c145432e6ed30eacbdd5dab1530f4 /meta/classes/license.bbclass
parentc22293622dd80fc9cdd49e96c52357c65fa3e9ef (diff)
downloadpoky-831e98325195f5631b977365fd61c3910a2c23a5.tar.gz
license.bbclass: do not process LICENSE_pn variables
The loop iterating over LICENSE_pn variables has never worked. In addition, the LICENSE variable is supposed to contain all licenses defined in LICENSE_pn variables. Thus, it is simpler just to use LICENSE as the data we get is essentially the same. [YOCTO #9499] (From OE-Core rev: d7229489c7dfd35164fd107d7944f3c273776118) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> 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.bbclass16
1 files changed, 1 insertions, 15 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 1313fdacb7..ad12db4838 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -387,20 +387,6 @@ def find_license_files(d):
387 import oe.license 387 import oe.license
388 from collections import defaultdict, OrderedDict 388 from collections import defaultdict, OrderedDict
389 389
390 pn = d.getVar('PN', True)
391 for package in d.getVar('PACKAGES', True):
392 if d.getVar('LICENSE_' + package, True):
393 license_types = license_types + ' & ' + \
394 d.getVar('LICENSE_' + package, True)
395
396 #If we get here with no license types, then that means we have a recipe
397 #level license. If so, we grab only those.
398 try:
399 license_types
400 except NameError:
401 # All the license types at the recipe level
402 license_types = d.getVar('LICENSE', True)
403
404 # All the license files for the package 390 # All the license files for the package
405 lic_files = d.getVar('LIC_FILES_CHKSUM', True) 391 lic_files = d.getVar('LIC_FILES_CHKSUM', True)
406 pn = d.getVar('PN', True) 392 pn = d.getVar('PN', True)
@@ -498,7 +484,7 @@ def find_license_files(d):
498 484
499 v = FindVisitor() 485 v = FindVisitor()
500 try: 486 try:
501 v.visit_string(license_types) 487 v.visit_string(d.getVar('LICENSE', True))
502 except oe.license.InvalidLicense as exc: 488 except oe.license.InvalidLicense as exc:
503 bb.fatal('%s: %s' % (d.getVar('PF', True), exc)) 489 bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
504 except SyntaxError: 490 except SyntaxError: