summaryrefslogtreecommitdiff
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2014-07-17 15:41:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-19 00:08:49 +0100
commit8998e13fc95f11d15c34fb09d8451a9d4b69f2f1 (patch)
tree2b2e4f7479e4c0407bf29148a499178e608fdd61 /meta/classes/base.bbclass
parent32c5b31d8a22bb8ba49db8a5c797ad0f421e67a3 (diff)
downloadopenembedded-core-8998e13fc95f11d15c34fb09d8451a9d4b69f2f1.tar.gz
openembedded-core-8998e13fc95f11d15c34fb09d8451a9d4b69f2f1.tar.bz2
openembedded-core-8998e13fc95f11d15c34fb09d8451a9d4b69f2f1.zip
license.bbclass: canonicalise licenses when dealing with INCOMPATIBLE_LICENSE
If INCOMPATIBLE_LICENSE=GPL-3.0 but the recipe sets LICENSE=GPLv3, the current code won't trigger because they're different strings. Fix this by attempting to canonicalise every license name to a SPDX name, so both names in this example become GPL-3.0. [ YOCTO #5622 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index c0d2c8ec88..8114cf648b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -540,6 +540,8 @@ python () {
check_license = False
if check_license and bad_licenses:
+ bad_licenses = map(lambda l: canonical_license(d, l), bad_licenses)
+
whitelist = []
for lic in bad_licenses:
for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]: