aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2013-01-15 13:22:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-18 13:04:00 +0000
commit7fab4cd27a2ad896218123ca82252e2b59526726 (patch)
tree64781f89f079fc8a19e3e51635bcd8e44f830e93 /meta/classes/license.bbclass
parentdf4a4b9792e3bd13b396b94e232c69054fdf19b5 (diff)
downloadopenembedded-core-contrib-7fab4cd27a2ad896218123ca82252e2b59526726.tar.gz
license.bbclass: cleanly handle invalid licenses in incompatible_license
This gives us an error message (bb.fatal) rather than a traceback due to the uncaught LicenseError. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index cfb816d5a4..cd18e198d4 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -237,7 +237,10 @@ def incompatible_license(d, dont_want_licenses, package=None):
def choose_lic_set(a, b):
return a if all(license_ok(lic) for lic in a) else b
- licenses=oe.license.flattened_licenses(license, choose_lic_set)
+ try:
+ licenses = oe.license.flattened_licenses(license, choose_lic_set)
+ except oe.license.LicenseError as exc:
+ bb.fatal('%s: %s' % (d.getVar('P', True), exc))
return any(not license_ok(l) for l in licenses)
def check_license_flags(d):