summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2022-02-27 19:21:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-01 23:44:59 +0000
commit83766c9fffa45cd3a94cf8076f7c8f45aba11a12 (patch)
tree86f6f27a115e7416bf3cae085ef6d82f9ecbccb1 /meta/classes/license.bbclass
parent68d1a56e987ee530620bdf245ddf1812f8cf6d39 (diff)
downloadpoky-83766c9fffa45cd3a94cf8076f7c8f45aba11a12.tar.gz
meta, meta-selftest: Replace more non-SPDX license identifiers
In commit ceda3238 (meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers) all LICENSE variables were updated to only use SPDX license identifiers. This does the same for comments and other variables where it is appropriate to use the official SPDX license identifiers. There are still references to, e.g., "GPLv3", but they are then typically in descriptive text where they refer to the license in a generic sense. (From OE-Core rev: 165759dced7fbe73b1db2ede67047896071dc6d0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index dec9867209..68c022248c 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -193,7 +193,7 @@ def find_license_files(d):
193 os.path.join(srcdir, non_generic_lic), None, None)) 193 os.path.join(srcdir, non_generic_lic), None, None))
194 non_generic_lics[non_generic_lic] = license_type 194 non_generic_lics[non_generic_lic] = license_type
195 else: 195 else:
196 # Add explicity avoid of CLOSED license because this isn't generic 196 # Explicitly avoid the CLOSED license because this isn't generic
197 if license_type != 'CLOSED': 197 if license_type != 'CLOSED':
198 # And here is where we warn people that their licenses are lousy 198 # And here is where we warn people that their licenses are lousy
199 oe.qa.handle_error("license-exists", 199 oe.qa.handle_error("license-exists",
@@ -252,7 +252,7 @@ def return_spdx(d, license):
252def canonical_license(d, license): 252def canonical_license(d, license):
253 """ 253 """
254 Return the canonical (SPDX) form of the license if available (so GPLv3 254 Return the canonical (SPDX) form of the license if available (so GPLv3
255 becomes GPL-3.0) or the passed license if there is no canonical form. 255 becomes GPL-3.0-only) or the passed license if there is no canonical form.
256 """ 256 """
257 return d.getVarFlag('SPDXLICENSEMAP', license) or license 257 return d.getVarFlag('SPDXLICENSEMAP', license) or license
258 258
@@ -287,7 +287,8 @@ def expand_wildcard_licenses(d, wildcard_licenses):
287 for wld_lic in wildcard_licenses: 287 for wld_lic in wildcard_licenses:
288 spdxflags = fnmatch.filter(spdxmapkeys, wld_lic) 288 spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
289 licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags] 289 licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
290 # Assume if we're passed "GPLv3" or "*GPLv3" it means -or-later as well 290 # Assume that if we are passed "GPL-3.0" or "*GPL-3.0", then it means
291 # "-or-later" as well.
291 if not wld_lic.endswith(("-or-later", "-only", "*", "+")): 292 if not wld_lic.endswith(("-or-later", "-only", "*", "+")):
292 spdxflags = fnmatch.filter(spdxmapkeys, wld_lic + "+") 293 spdxflags = fnmatch.filter(spdxmapkeys, wld_lic + "+")
293 licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags] 294 licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]