mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
8491c2a522
commit
cea9f48ea8
@@ -237,7 +237,10 @@ def incompatible_license(d, dont_want_licenses, package=None):
|
|||||||
def choose_lic_set(a, b):
|
def choose_lic_set(a, b):
|
||||||
return a if all(license_ok(lic) for lic in a) else 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)
|
return any(not license_ok(l) for l in licenses)
|
||||||
|
|
||||||
def check_license_flags(d):
|
def check_license_flags(d):
|
||||||
|
|||||||
Reference in New Issue
Block a user