diff options
author | Beth Flanagan <elizabeth.flanagan@intel.com> | 2015-07-31 16:40:07 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-01 21:19:42 +0100 |
commit | 1f404c9bd87042fc0719f8ebc2a90aaceceaf52a (patch) | |
tree | 26462a18f357e82a60ebc94856d48ff11f8b0564 /meta | |
parent | e232ad758a0eb0b16c304d4694b0a217cf4da3b8 (diff) | |
download | ast2050-yocto-poky-1f404c9bd87042fc0719f8ebc2a90aaceceaf52a.zip ast2050-yocto-poky-1f404c9bd87042fc0719f8ebc2a90aaceceaf52a.tar.gz |
base.bbclass: Note when including pn with INCOMPATIBLE_LICENSES
We need to be able to tell people if we WHITELIST a recipe
that contains an incompatible licese.
Example: If we set WHITELIST_GPL-3.0 ?= "foo", foo will end
up on an image even if GPL-3.0 is incompatible. This is the
correct behaviour but there is nothing telling people that it
is even happening.
(From OE-Core master rev: c9da529943b2f563b7b0aeb43576c13dd3b6f932)
(From OE-Core rev: 1b449dd0ee88274d01f2ec1f2a22955b824ff8ef)
Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/base.bbclass | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 7e2787a..effe12e 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -476,12 +476,30 @@ python () { bad_licenses = expand_wildcard_licenses(d, bad_licenses) whitelist = [] + incompatwl = [] + htincompatwl = [] for lic in bad_licenses: + spdx_license = return_spdx(d, lic) for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]: whitelist.extend((d.getVar(w + lic, True) or "").split()) - spdx_license = return_spdx(d, lic) - if spdx_license: - whitelist.extend((d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split()) + if spdx_license: + whitelist.extend((d.getVar(w + spdx_license, True) or "").split()) + ''' + We need to track what we are whitelisting and why. If pn is + incompatible and is not HOSTTOOLS_WHITELIST_ we need to be + able to note that the image that is created may infact + contain incompatible licenses despite INCOMPATIBLE_LICENSE + being set. + ''' + if "HOSTTOOLS" in w: + htincompatwl.extend((d.getVar(w + lic, True) or "").split()) + if spdx_license: + htincompatwl.extend((d.getVar(w + spdx_license, True) or "").split()) + else: + incompatwl.extend((d.getVar(w + lic, True) or "").split()) + if spdx_license: + incompatwl.extend((d.getVar(w + spdx_license, True) or "").split()) + if not pn in whitelist: recipe_license = d.getVar('LICENSE', True) pkgs = d.getVar('PACKAGES', True).split() @@ -502,6 +520,11 @@ python () { elif all_skipped or incompatible_license(d, bad_licenses): bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license)) raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license) + elif pn in whitelist: + if pn in incompatwl: + bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted") + elif pn in htincompatwl: + bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted for HOSTTOOLS") srcuri = d.getVar('SRC_URI', True) # Svn packages should DEPEND on subversion-native |