diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-28 15:20:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-02 18:41:52 +0000 |
commit | 9379f80f484f94686a4d494e9e237fadfb72a938 (patch) | |
tree | 6791e31dfa29c9fc12e579d8f1493fe00cad4b77 /meta/classes/base.bbclass | |
parent | 0d19c45ba6cf43518f380ca5afe9753a2eda0691 (diff) | |
download | openembedded-core-9379f80f484f94686a4d494e9e237fadfb72a938.tar.gz |
license/insane: Show warning for obsolete license usage
We want to use SPDX identifiers in LICENSE variables. There is now a
conversion script to make most of the translations. Add a list of
strings which have been replaced so we can show warnings to users
if they're still used anywhere.
Add checks to the package as insane check. This is currently a warning
by default but can be turned off or made an error as per the other standard
checks.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 1d5db96afb..966eadad67 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -597,6 +597,12 @@ python () { exceptions = (d.getVar("INCOMPATIBLE_LICENSE_EXCEPTIONS") or "").split() + for lic_exception in exceptions: + if ":" in lic_exception: + lic_exception.split(":")[0] + if lic_exception in oe.license.obsolete_license_list(): + bb.fatal("Invalid license %s used in INCOMPATIBLE_LICENSE_EXCEPTIONS" % lic_exception) + pkgs = d.getVar('PACKAGES').split() skipped_pkgs = {} unskipped_pkgs = [] |