diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-18 15:07:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-21 22:01:28 +0000 |
commit | 55a3da9c0de86e09e9c8182d85a0804bc8d952e4 (patch) | |
tree | dffc973332f9fd8912c063735157042e52825153 /meta/classes | |
parent | 6638a7289e63a62878a70afa1f79616e3e8097cb (diff) | |
download | poky-55a3da9c0de86e09e9c8182d85a0804bc8d952e4.tar.gz |
licenses: Update INCOMPATIBLE_LICENSE for 'or-later' handling
Where a user adds "GPLv3" to INCOMPATIBLE_LICENSE they almost certainly
mean both GPLv3-only and GPLv3-or-later. Update the code to handle this
correctly.
(From OE-Core rev: 08cbf17485b6443a6118acfac8200eb6c61445a3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/license.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 358c716a80..bcea0b3cb5 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -281,6 +281,12 @@ def expand_wildcard_licenses(d, wildcard_licenses): | |||
281 | wildcards from SPDXLICENSEMAP flags and AVAILABLE_LICENSES. | 281 | wildcards from SPDXLICENSEMAP flags and AVAILABLE_LICENSES. |
282 | """ | 282 | """ |
283 | import fnmatch | 283 | import fnmatch |
284 | |||
285 | # Assume if we're passed "GPLv3" or "*GPLv3" it means -or-later as well | ||
286 | for lic in wildcard_licenses[:]: | ||
287 | if not lic.endswith(("-or-later", "-only", "*")): | ||
288 | wildcard_licenses.append(lic + "+") | ||
289 | |||
284 | licenses = wildcard_licenses[:] | 290 | licenses = wildcard_licenses[:] |
285 | spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys() | 291 | spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys() |
286 | for wld_lic in wildcard_licenses: | 292 | for wld_lic in wildcard_licenses: |