Hi Richard,
On Thu, Feb 18, 2021 at 04:56:40PM +0000, Richard Purdie wrote:
> 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 <[email protected]>
> ---
> meta/classes/license.bbclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
> index 358c716a801..be8541f20dc 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" it means -or-later as well
> + for lic in wildcard_licenses[:]:
> + if "*" not in lic and not lic.endswith(("-or-later", "-only")):
> + wildcard_licenses.append(lic + "-or-later")
> +
This means that "GPLv3" will have a different meaning in recipes than in
INCOMPATIBLE_LICENSE.
Can't we just force users to use an original SPDX (the one which ends
with -or-later or -only) instead for INCOMPATIBLE_LICENSE? This would
probably be as simple as looking if the license is in SPDXLICENSEMAP
varflags keys?
This feels less hacky to me.
Let me know your thoughts on this,
Cheers,
Quentin
> licenses = wildcard_licenses[:]
> spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
> for wld_lic in wildcard_licenses:
> --
> 2.27.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#148342):
https://lists.openembedded.org/g/openembedded-core/message/148342
Mute This Topic: https://lists.openembedded.org/mt/80734227/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-