[oe-commits] [openembedded-core] 28/33: license.bbclass: Make incompatible_pkg_license return incompatible lics
git at git.openembedded.org
git at git.openembedded.org
Mon Dec 16 23:28:09 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 02a3189b4902e616f5b4277ee3d0fca10b73b4dc
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Wed Dec 11 17:48:15 2019 +0100
license.bbclass: Make incompatible_pkg_license return incompatible lics
This makes it possible to report the incompatible licenses.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/license.bbclass | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index c388740..f90176d 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -310,15 +310,21 @@ def incompatible_pkg_license(d, dont_want_licenses, license):
# Handles an "or" or two license sets provided by
# flattened_licenses(), pick one that works if possible.
def choose_lic_set(a, b):
- return a if all(oe.license.license_ok(canonical_license(d, lic),
+ return a if all(oe.license.license_ok(canonical_license(d, lic),
dont_want_licenses) for lic in a) else b
try:
licenses = oe.license.flattened_licenses(license, choose_lic_set)
except oe.license.LicenseError as exc:
bb.fatal('%s: %s' % (d.getVar('P'), exc))
- return any(not oe.license.license_ok(canonical_license(d, l), \
- dont_want_licenses) for l in licenses)
+
+ incompatible_lic = []
+ for l in licenses:
+ license = canonical_license(d, l)
+ if not oe.license.license_ok(license, dont_want_licenses):
+ incompatible_lic.append(license)
+
+ return sorted(incompatible_lic)
def incompatible_license(d, dont_want_licenses, package=None):
"""
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list