summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei.gherzan@windriver.com>2012-01-10 17:17:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-10 17:40:44 +0000
commit4005c3ff5e673f9d561026c76326054bd0a3a2b6 (patch)
tree8876f26e016fa2be1284450e795259c096a2a2d2 /meta/classes/base.bbclass
parenta5463088fe57462bf681b648d21212808454fc2a (diff)
downloadpoky-4005c3ff5e673f9d561026c76326054bd0a3a2b6.tar.gz
license.bbclass base.bbclass: support for 'or' operand in LICENSE and for SPDX license names
A new function was defined in license.bbclass in order to correctly exclude packages where OE-Style licence naming is used. In this way licenses as GPL-3, GPLv3, GPLv3.0 etc will be excluded from a non-GPLv3 build. This function takes into consideration if 'or' operand is used. The function defined in license.bbclass is called in base.bbclass where packages are excluded based on INCOMPATIBLE_LICENSE variable. [YOCTO #1884] [YOCTO #1844] (From OE-Core rev: 28456593be0b7e15bb51595d547d7e5347cce24b) Signed-off-by: Andrei Gherzan <andrei at gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass3
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index e65a7220f5..f0c358ea32 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -398,9 +398,8 @@ python () {
398 dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, 1) or "").split() 398 dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, 1) or "").split()
399 if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist: 399 if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist:
400 400
401 import re
402 this_license = d.getVar('LICENSE', 1) 401 this_license = d.getVar('LICENSE', 1)
403 if this_license and re.search(dont_want_license, this_license): 402 if incompatible_license(d,dont_want_license):
404 bb.note("SKIPPING %s because it's %s" % (pn, this_license)) 403 bb.note("SKIPPING %s because it's %s" % (pn, this_license))
405 raise bb.parse.SkipPackage("incompatible with license %s" % this_license) 404 raise bb.parse.SkipPackage("incompatible with license %s" % this_license)
406 405