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 21:59:52 +0000 |
commit | 08cbf17485b6443a6118acfac8200eb6c61445a3 (patch) | |
tree | 9be0a415d4620a969be22f0281ebe2746780b037 /meta/classes/license.bbclass | |
parent | d1baf74ac92fe0c8c32dff101fd77d77f70fd583 (diff) | |
download | openembedded-core-contrib-08cbf17485b6443a6118acfac8200eb6c61445a3.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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-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): wildcards from SPDXLICENSEMAP flags and AVAILABLE_LICENSES. """ import fnmatch + + # Assume if we're passed "GPLv3" or "*GPLv3" it means -or-later as well + for lic in wildcard_licenses[:]: + if not lic.endswith(("-or-later", "-only", "*")): + wildcard_licenses.append(lic + "+") + licenses = wildcard_licenses[:] spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys() for wld_lic in wildcard_licenses: |