aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-02 23:45:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-04 23:35:03 +0000
commit42a10788e89b07b14a150ced07113566cf99fcdd (patch)
tree7d4f14c3993cf1822ad17f0d67c8820314b6f17b /meta/classes/license.bbclass
parent247522b0eae6ec528350888d2283e84bb1e250fa (diff)
downloadopenembedded-core-contrib-42a10788e89b07b14a150ced07113566cf99fcdd.tar.gz
classes/lib: Add expand parameter to getVarFlag
This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, True):g' -i `grep -ril getVar *` In this case, the default was False, but True was used since in most cases here expansion would be expected. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass12
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 301216d5d60..fe38d2152ce 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -416,10 +416,10 @@ def find_license_files(d):
for lic_dir in license_source_dirs:
if not os.path.isfile(os.path.join(lic_dir, license_type)):
- if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
+ if d.getVarFlag('SPDXLICENSEMAP', license_type, True) != None:
# Great, there is an SPDXLICENSEMAP. We can copy!
bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type))
- spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
+ spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type, True)
license_source = lic_dir
break
elif os.path.isfile(os.path.join(lic_dir, license_type)):
@@ -435,14 +435,14 @@ def find_license_files(d):
# The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense
# and should not be allowed, warn the user in this case.
- if d.getVarFlag('NO_GENERIC_LICENSE', license_type):
+ if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True):
bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type))
- elif d.getVarFlag('NO_GENERIC_LICENSE', license_type):
+ elif d.getVarFlag('NO_GENERIC_LICENSE', license_type, True):
# if NO_GENERIC_LICENSE is set, we copy the license files from the fetched source
# of the package rather than the license_source_dirs.
for (basename, path) in lic_files_paths:
- if d.getVarFlag('NO_GENERIC_LICENSE', license_type) == basename:
+ if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True) == basename:
lic_files_paths.append(("generic_" + license_type, path))
break
else:
@@ -510,7 +510,7 @@ def expand_wildcard_licenses(d, wildcard_licenses):
spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
for wld_lic in wildcard_licenses:
spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
- licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
+ licenses += [d.getVarFlag('SPDXLICENSEMAP', flag, True) for flag in spdxflags]
spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split()
for wld_lic in wildcard_licenses: