From 28456593be0b7e15bb51595d547d7e5347cce24b Mon Sep 17 00:00:00 2001 From: Andrei Gherzan Date: Tue, 10 Jan 2012 17:17:58 +0200 Subject: 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] Signed-off-by: Andrei Gherzan Signed-off-by: Richard Purdie --- meta/classes/base.bbclass | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'meta/classes/base.bbclass') 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 () { dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, 1) or "").split() if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist: - import re this_license = d.getVar('LICENSE', 1) - if this_license and re.search(dont_want_license, this_license): + if incompatible_license(d,dont_want_license): bb.note("SKIPPING %s because it's %s" % (pn, this_license)) raise bb.parse.SkipPackage("incompatible with license %s" % this_license) -- cgit v1.2.3