summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commit3c59b1bf93adb0b9f723bda1d8702c8720733677 (patch)
treed1939643e2d02f0ce2e9ef33e235cd23cd5000d3 /meta/classes/license.bbclass
parentc0f2890c01882e9ea14e781c044f3a84f75bd0fc (diff)
downloadpoky-3c59b1bf93adb0b9f723bda1d8702c8720733677.tar.gz
meta: remove True option to getVarFlag calls
getVarFlag() now defaults to expanding by default, thus remove the True option from getVarFlag() calls with a regex search and replace. Search made with the following regex: getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\) (From OE-Core rev: 2dea9e490a98377010b3d4118d054814c317a735) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index c5d1204ca1..009ee4a37d 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -249,7 +249,7 @@ def get_boot_dependencies(d):
249 249
250 for task in boot_tasks: 250 for task in boot_tasks:
251 boot_depends_string = "%s %s" % (boot_depends_string, 251 boot_depends_string = "%s %s" % (boot_depends_string,
252 d.getVarFlag(task, "depends", True) or "") 252 d.getVarFlag(task, "depends") or "")
253 boot_depends = [dep.split(":")[0] for dep 253 boot_depends = [dep.split(":")[0] for dep
254 in boot_depends_string.split() 254 in boot_depends_string.split()
255 if not dep.split(":")[0].endswith("-native")] 255 if not dep.split(":")[0].endswith("-native")]
@@ -431,10 +431,10 @@ def find_license_files(d):
431 # unless NO_GENERIC_LICENSE is set. 431 # unless NO_GENERIC_LICENSE is set.
432 for lic_dir in license_source_dirs: 432 for lic_dir in license_source_dirs:
433 if not os.path.isfile(os.path.join(lic_dir, license_type)): 433 if not os.path.isfile(os.path.join(lic_dir, license_type)):
434 if d.getVarFlag('SPDXLICENSEMAP', license_type, True) != None: 434 if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
435 # Great, there is an SPDXLICENSEMAP. We can copy! 435 # Great, there is an SPDXLICENSEMAP. We can copy!
436 bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type)) 436 bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type))
437 spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type, True) 437 spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
438 license_source = lic_dir 438 license_source = lic_dir
439 break 439 break
440 elif os.path.isfile(os.path.join(lic_dir, license_type)): 440 elif os.path.isfile(os.path.join(lic_dir, license_type)):
@@ -442,7 +442,7 @@ def find_license_files(d):
442 license_source = lic_dir 442 license_source = lic_dir
443 break 443 break
444 444
445 non_generic_lic = d.getVarFlag('NO_GENERIC_LICENSE', license_type, True) 445 non_generic_lic = d.getVarFlag('NO_GENERIC_LICENSE', license_type)
446 if spdx_generic and license_source: 446 if spdx_generic and license_source:
447 # we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest 447 # we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest
448 # audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes) 448 # audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes)
@@ -451,7 +451,7 @@ def find_license_files(d):
451 451
452 # The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense 452 # The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense
453 # and should not be allowed, warn the user in this case. 453 # and should not be allowed, warn the user in this case.
454 if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True): 454 if d.getVarFlag('NO_GENERIC_LICENSE', license_type):
455 bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type)) 455 bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type))
456 456
457 elif non_generic_lic and non_generic_lic in lic_chksums: 457 elif non_generic_lic and non_generic_lic in lic_chksums:
@@ -505,7 +505,7 @@ def return_spdx(d, license):
505 """ 505 """
506 This function returns the spdx mapping of a license if it exists. 506 This function returns the spdx mapping of a license if it exists.
507 """ 507 """
508 return d.getVarFlag('SPDXLICENSEMAP', license, True) 508 return d.getVarFlag('SPDXLICENSEMAP', license)
509 509
510def canonical_license(d, license): 510def canonical_license(d, license):
511 """ 511 """
@@ -514,7 +514,7 @@ def canonical_license(d, license):
514 'X' if availabel and the tailing '+' (so GPLv3+ becomes GPL-3.0+), 514 'X' if availabel and the tailing '+' (so GPLv3+ becomes GPL-3.0+),
515 or the passed license if there is no canonical form. 515 or the passed license if there is no canonical form.
516 """ 516 """
517 lic = d.getVarFlag('SPDXLICENSEMAP', license, True) or "" 517 lic = d.getVarFlag('SPDXLICENSEMAP', license) or ""
518 if not lic and license.endswith('+'): 518 if not lic and license.endswith('+'):
519 lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+'), True) 519 lic = d.getVarFlag('SPDXLICENSEMAP', license.rstrip('+'), True)
520 if lic: 520 if lic:
@@ -531,7 +531,7 @@ def expand_wildcard_licenses(d, wildcard_licenses):
531 spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys() 531 spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
532 for wld_lic in wildcard_licenses: 532 for wld_lic in wildcard_licenses:
533 spdxflags = fnmatch.filter(spdxmapkeys, wld_lic) 533 spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
534 licenses += [d.getVarFlag('SPDXLICENSEMAP', flag, True) for flag in spdxflags] 534 licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
535 535
536 spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split() 536 spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split()
537 for wld_lic in wildcard_licenses: 537 for wld_lic in wildcard_licenses: