diff options
Diffstat (limited to 'meta/classes/license.bbclass')
| -rw-r--r-- | meta/classes/license.bbclass | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 301216d5d6..fe38d2152c 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
| @@ -416,10 +416,10 @@ def find_license_files(d): | |||
| 416 | 416 | ||
| 417 | for lic_dir in license_source_dirs: | 417 | for lic_dir in license_source_dirs: |
| 418 | if not os.path.isfile(os.path.join(lic_dir, license_type)): | 418 | if not os.path.isfile(os.path.join(lic_dir, license_type)): |
| 419 | if d.getVarFlag('SPDXLICENSEMAP', license_type) != None: | 419 | if d.getVarFlag('SPDXLICENSEMAP', license_type, True) != None: |
| 420 | # Great, there is an SPDXLICENSEMAP. We can copy! | 420 | # Great, there is an SPDXLICENSEMAP. We can copy! |
| 421 | bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type)) | 421 | bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type)) |
| 422 | spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type) | 422 | spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type, True) |
| 423 | license_source = lic_dir | 423 | license_source = lic_dir |
| 424 | break | 424 | break |
| 425 | elif os.path.isfile(os.path.join(lic_dir, license_type)): | 425 | elif os.path.isfile(os.path.join(lic_dir, license_type)): |
| @@ -435,14 +435,14 @@ def find_license_files(d): | |||
| 435 | 435 | ||
| 436 | # The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense | 436 | # The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense |
| 437 | # and should not be allowed, warn the user in this case. | 437 | # and should not be allowed, warn the user in this case. |
| 438 | if d.getVarFlag('NO_GENERIC_LICENSE', license_type): | 438 | if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True): |
| 439 | bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type)) | 439 | bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type)) |
| 440 | 440 | ||
| 441 | elif d.getVarFlag('NO_GENERIC_LICENSE', license_type): | 441 | elif d.getVarFlag('NO_GENERIC_LICENSE', license_type, True): |
| 442 | # if NO_GENERIC_LICENSE is set, we copy the license files from the fetched source | 442 | # if NO_GENERIC_LICENSE is set, we copy the license files from the fetched source |
| 443 | # of the package rather than the license_source_dirs. | 443 | # of the package rather than the license_source_dirs. |
| 444 | for (basename, path) in lic_files_paths: | 444 | for (basename, path) in lic_files_paths: |
| 445 | if d.getVarFlag('NO_GENERIC_LICENSE', license_type) == basename: | 445 | if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True) == basename: |
| 446 | lic_files_paths.append(("generic_" + license_type, path)) | 446 | lic_files_paths.append(("generic_" + license_type, path)) |
| 447 | break | 447 | break |
| 448 | else: | 448 | else: |
| @@ -510,7 +510,7 @@ def expand_wildcard_licenses(d, wildcard_licenses): | |||
| 510 | spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys() | 510 | spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys() |
| 511 | for wld_lic in wildcard_licenses: | 511 | for wld_lic in wildcard_licenses: |
| 512 | spdxflags = fnmatch.filter(spdxmapkeys, wld_lic) | 512 | spdxflags = fnmatch.filter(spdxmapkeys, wld_lic) |
| 513 | licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags] | 513 | licenses += [d.getVarFlag('SPDXLICENSEMAP', flag, True) for flag in spdxflags] |
| 514 | 514 | ||
| 515 | spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split() | 515 | spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split() |
| 516 | for wld_lic in wildcard_licenses: | 516 | for wld_lic in wildcard_licenses: |
