summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/license.py
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@windriver.com>2022-02-23 17:26:59 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-02 18:43:25 +0000
commitd6449581c998a24145e527c571b3baf90a9f2518 (patch)
treef20a0fd2e91dd9fb294e5243f28b1533fc8ec21c /meta/lib/oe/license.py
parent9ead8e762e977d41b0107553b4827f9a7edc252f (diff)
downloadpoky-d6449581c998a24145e527c571b3baf90a9f2518.tar.gz
base/license: Rework INCOMPATIBLE_LICENSE variable handling
This re-writes the INCOMPATIBLE_LICENSE checking code to replace the WHITELIST_<lic> with INCOMPATIBLE_LICENSE_EXCEPTIONS = '<pkg>:<lic> <pkg>:<lic> ...' This initial change leaves most of the code structure in place, but the code in base.bbclass needs to be re-written to make the check more consistent around packages (PKGS) and not recipe names (PN). This also is taking into account the changes for SPDX licenses. The aim is to provide a mode consistent variable where the variable name is known and can easily be queried. (From OE-Core rev: 0d19c45ba6cf43518f380ca5afe9753a2eda0691) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/license.py')
-rw-r--r--meta/lib/oe/license.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 8955cbdeb2..29412dfe46 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -242,3 +242,8 @@ def list_licenses(licensestr):
242 except SyntaxError as exc: 242 except SyntaxError as exc:
243 raise LicenseSyntaxError(licensestr, exc) 243 raise LicenseSyntaxError(licensestr, exc)
244 return visitor.licenses 244 return visitor.licenses
245
246def apply_pkg_license_exception(pkg, bad_licenses, exceptions):
247 """Return remaining bad licenses after removing any package exceptions"""
248
249 return [lic for lic in bad_licenses if pkg + ':' + lic not in exceptions]