summaryrefslogtreecommitdiff
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorElizabeth Flanagan <elizabeth.flanagan@intel.com>2012-03-23 16:51:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-25 11:08:26 +0100
commit178be339e09078c56a5231a10551f3b9aed16f9c (patch)
tree446528f4d71126ce00a59a88269064fbdfbfb233 /meta/classes/license.bbclass
parent2bc1d04e62a8c84e3195d538f844e90c32df8acc (diff)
downloadopenembedded-core-178be339e09078c56a5231a10551f3b9aed16f9c.tar.gz
openembedded-core-178be339e09078c56a5231a10551f3b9aed16f9c.tar.bz2
openembedded-core-178be339e09078c56a5231a10551f3b9aed16f9c.tar.xz
openembedded-core-178be339e09078c56a5231a10551f3b9aed16f9c.zip
license.bbclass: Whitespace standardization
Removing tabs within check_license_flags to standardize to 4 space tabbing Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass31
1 files changed, 15 insertions, 16 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 40dcbeba3..4b392ceea 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -266,23 +266,23 @@ def incompatible_license(d,dont_want_license):
dont_want_licenses = []
dont_want_licenses.append(d.getVar('INCOMPATIBLE_LICENSE', True))
if d.getVarFlag('SPDXLICENSEMAP', dont_want_license):
- dont_want_licenses.append(d.getVarFlag('SPDXLICENSEMAP', dont_want_license))
+ dont_want_licenses.append(d.getVarFlag('SPDXLICENSEMAP', dont_want_license))
def include_license(license):
- if any(fnmatch(license, pattern) for pattern in dont_want_licenses):
- return False
- else:
- spdx_license = d.getVarFlag('SPDXLICENSEMAP', license)
- if spdx_license and any(fnmatch(spdx_license, pattern) for pattern in dont_want_licenses):
- return False
- else:
- return True
+ if any(fnmatch(license, pattern) for pattern in dont_want_licenses):
+ return False
+ else:
+ spdx_license = d.getVarFlag('SPDXLICENSEMAP', license)
+ if spdx_license and any(fnmatch(spdx_license, pattern) for pattern in dont_want_licenses):
+ return False
+ else:
+ return True
def choose_licenses(a, b):
if all(include_license(lic) for lic in a):
- return a
+ return a
else:
- return b
+ return b
"""
If you want to exlude license named generically 'X', we surely want to exlude 'X+' as well.
@@ -290,13 +290,13 @@ def incompatible_license(d,dont_want_license):
is not a 'X+' license.
"""
if not re.search(r'[+]',dont_want_license):
- licenses=oe.license.flattened_licenses(re.sub(r'[+]', '', d.getVar('LICENSE', True)), choose_licenses)
+ licenses=oe.license.flattened_licenses(re.sub(r'[+]', '', d.getVar('LICENSE', True)), choose_licenses)
else:
- licenses=oe.license.flattened_licenses(d.getVar('LICENSE', True), choose_licenses)
+ licenses=oe.license.flattened_licenses(d.getVar('LICENSE', True), choose_licenses)
for onelicense in licenses:
- if not include_license(onelicense):
- return True
+ if not include_license(onelicense):
+ return True
return False
@@ -361,7 +361,6 @@ def check_license_flags(d):
return unmatched_flag
return None
-
SSTATETASKS += "do_populate_lic"
do_populate_lic[sstate-name] = "populate-lic"
do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"