diff options
author | Christopher Larson <chris_larson@mentor.com> | 2013-01-15 13:22:48 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-18 13:28:05 +0000 |
commit | cea9f48ea80a65d48e5f1ca1ce2c3fbb62958c1b (patch) | |
tree | b7f9bb19b1699bba57931a55d45bb8da2b6bca7e /meta/classes | |
parent | 8491c2a5222dfa890c4ed922af02b6b4551a08c4 (diff) | |
download | poky-cea9f48ea80a65d48e5f1ca1ce2c3fbb62958c1b.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.
(From OE-Core rev: 7fab4cd27a2ad896218123ca82252e2b59526726)
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/license.bbclass | 5 |
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): | |||
237 | def choose_lic_set(a, b): | 237 | def choose_lic_set(a, b): |
238 | return a if all(license_ok(lic) for lic in a) else b | 238 | return a if all(license_ok(lic) for lic in a) else b |
239 | 239 | ||
240 | licenses=oe.license.flattened_licenses(license, choose_lic_set) | 240 | try: |
241 | licenses = oe.license.flattened_licenses(license, choose_lic_set) | ||
242 | except oe.license.LicenseError as exc: | ||
243 | bb.fatal('%s: %s' % (d.getVar('P', True), exc)) | ||
241 | return any(not license_ok(l) for l in licenses) | 244 | return any(not license_ok(l) for l in licenses) |
242 | 245 | ||
243 | def check_license_flags(d): | 246 | def check_license_flags(d): |