diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-18 15:14:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:57:25 +0100 |
commit | 86d30d756a60d181a95cf07041920a367a0cd0ba (patch) | |
tree | 950353e2e1cd1e7b812ff941b4d06076acd2c752 /meta/classes/license.bbclass | |
parent | f98c8490099a02c42306e1671579631a61c9df73 (diff) | |
download | poky-86d30d756a60d181a95cf07041920a367a0cd0ba.tar.gz |
meta: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.
This patch was mostly made using the command:
sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`
(From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r-- | meta/classes/license.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 756e7f04f3..224d541f75 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -160,7 +160,7 @@ def add_package_and_files(d): | |||
160 | packages = d.getVar('PACKAGES', True) | 160 | packages = d.getVar('PACKAGES', True) |
161 | files = d.getVar('LICENSE_FILES_DIRECTORY', True) | 161 | files = d.getVar('LICENSE_FILES_DIRECTORY', True) |
162 | pn = d.getVar('PN', True) | 162 | pn = d.getVar('PN', True) |
163 | pn_lic = "%s%s" % (pn, d.getVar('LICENSE_PACKAGE_SUFFIX')) | 163 | pn_lic = "%s%s" % (pn, d.getVar('LICENSE_PACKAGE_SUFFIX', False)) |
164 | if pn_lic in packages: | 164 | if pn_lic in packages: |
165 | bb.warn("%s package already existed in %s." % (pn_lic, pn)) | 165 | bb.warn("%s package already existed in %s." % (pn_lic, pn)) |
166 | else: | 166 | else: |
@@ -348,7 +348,7 @@ def expand_wildcard_licenses(d, wildcard_licenses): | |||
348 | spdxflags = fnmatch.filter(spdxmapkeys, wld_lic) | 348 | spdxflags = fnmatch.filter(spdxmapkeys, wld_lic) |
349 | licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags] | 349 | licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags] |
350 | 350 | ||
351 | spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES') or '').split() | 351 | spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split() |
352 | for wld_lic in wildcard_licenses: | 352 | for wld_lic in wildcard_licenses: |
353 | licenses += fnmatch.filter(spdx_lics, wld_lic) | 353 | licenses += fnmatch.filter(spdx_lics, wld_lic) |
354 | 354 | ||