Lines Matching refs:license

1 # Populates LICENSE_DIRECTORY as set in distro config with the license files as set by
4 # - There is a real issue revolving around license naming standards.
7 LICSSTATEDIR = "${WORKDIR}/license-destdir/"
9 # Create extra package with license texts and add it to RRECOMMENDS:${PN}
87 # Copy license files if hardlink is not possible even if st_dev is the
106 bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e))
113 import oe.license
116 # All the license files for the package
119 # The license files are located in S/LIC_FILE_CHECKSUM.
138 class FindVisitor(oe.license.LicenseVisitor):
145 # the base license.
183 … # The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense
186 oe.qa.handle_error("license-no-generic",
187 …"%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type), d)
190 # if NO_GENERIC_LICENSE is set, we copy the license files from the fetched source
196 # Explicitly avoid the CLOSED license because this isn't generic
199 oe.qa.handle_error("license-exists",
200 … "%s: No generic license file exists for: %s in any provider" % (pn, license_type), d)
213 # We want the license filename and path
222 except oe.license.InvalidLicense as exc:
225 oe.qa.handle_error("license-syntax",
227 # Add files from LIC_FILES_CHKSUM to list of license files
239 # If there are multiple different license files with identical
246 def return_spdx(d, license):
248 This function returns the spdx mapping of a license if it exists.
250 return d.getVarFlag('SPDXLICENSEMAP', license)
252 def canonical_license(d, license):
254 Return the canonical (SPDX) form of the license if available (so GPLv3
255 becomes GPL-3.0-only) or the passed license if there is no canonical form.
257 return d.getVarFlag('SPDXLICENSEMAP', license) or license
277 if l in oe.license.obsolete_license_list():
278 …bb.fatal("Error, %s is an obsolete license, please use an SPDX reference in INCOMPATIBLE_LICENSE" …
280 bb.fatal("Error, %s is an invalid license wildcard entry" % l)
284 def incompatible_license_contains(license, truevalue, falsevalue, d):
285 license = canonical_license(d, license)
288 return truevalue if license in bad_licenses else falsevalue
290 def incompatible_pkg_license(d, dont_want_licenses, license):
291 # Handles an "or" or two license sets provided by
294 return a if all(oe.license.license_ok(canonical_license(d, lic),
298 licenses = oe.license.flattened_licenses(license, choose_lic_set)
299 except oe.license.LicenseError as exc:
304 license = canonical_license(d, l)
305 if not oe.license.license_ok(license, dont_want_licenses):
306 incompatible_lic.append(license)
316 import oe.license
317 license = d.getVar("LICENSE:%s" % package) if package else None
318 if not license:
319 license = d.getVar('LICENSE')
321 return incompatible_pkg_license(d, dont_want_licenses, license)
329 of acceptable license flags, or all of the LICENSE_FLAGS if there
394 from oe.license import license_operator, license_operator_chars, license_pattern
400 oe.qa.handle_error('license-format',
401 '%s: LICENSE value "%s" has an invalid format - license names ' \
403 'the license selection: %s' %
406 oe.qa.handle_error('license-format',