summaryrefslogtreecommitdiffstats
path: root/meta/classes
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 12:23:38 +0100
commita3da6c381f792535e68a67f7cb78eb82b5a09842 (patch)
tree425b45c8e6880b46c649d62b3cbc6f1827016b95 /meta/classes
parent5de2b70afc0856f5828dec82a1532cf645f6fc42 (diff)
downloadpoky-a3da6c381f792535e68a67f7cb78eb82b5a09842.tar.gz
license.bbclass: Whitespace standardization
Removing tabs within check_license_flags to standardize to 4 space tabbing (From OE-Core rev: 178be339e09078c56a5231a10551f3b9aed16f9c) Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-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 40dcbeba33..4b392ceea0 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -266,23 +266,23 @@ def incompatible_license(d,dont_want_license):
266 dont_want_licenses = [] 266 dont_want_licenses = []
267 dont_want_licenses.append(d.getVar('INCOMPATIBLE_LICENSE', True)) 267 dont_want_licenses.append(d.getVar('INCOMPATIBLE_LICENSE', True))
268 if d.getVarFlag('SPDXLICENSEMAP', dont_want_license): 268 if d.getVarFlag('SPDXLICENSEMAP', dont_want_license):
269 dont_want_licenses.append(d.getVarFlag('SPDXLICENSEMAP', dont_want_license)) 269 dont_want_licenses.append(d.getVarFlag('SPDXLICENSEMAP', dont_want_license))
270 270
271 def include_license(license): 271 def include_license(license):
272 if any(fnmatch(license, pattern) for pattern in dont_want_licenses): 272 if any(fnmatch(license, pattern) for pattern in dont_want_licenses):
273 return False 273 return False
274 else: 274 else:
275 spdx_license = d.getVarFlag('SPDXLICENSEMAP', license) 275 spdx_license = d.getVarFlag('SPDXLICENSEMAP', license)
276 if spdx_license and any(fnmatch(spdx_license, pattern) for pattern in dont_want_licenses): 276 if spdx_license and any(fnmatch(spdx_license, pattern) for pattern in dont_want_licenses):
277 return False 277 return False
278 else: 278 else:
279 return True 279 return True
280 280
281 def choose_licenses(a, b): 281 def choose_licenses(a, b):
282 if all(include_license(lic) for lic in a): 282 if all(include_license(lic) for lic in a):
283 return a 283 return a
284 else: 284 else:
285 return b 285 return b
286 286
287 """ 287 """
288 If you want to exlude license named generically 'X', we surely want to exlude 'X+' as well. 288 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):
290 is not a 'X+' license. 290 is not a 'X+' license.
291 """ 291 """
292 if not re.search(r'[+]',dont_want_license): 292 if not re.search(r'[+]',dont_want_license):
293 licenses=oe.license.flattened_licenses(re.sub(r'[+]', '', d.getVar('LICENSE', True)), choose_licenses) 293 licenses=oe.license.flattened_licenses(re.sub(r'[+]', '', d.getVar('LICENSE', True)), choose_licenses)
294 else: 294 else:
295 licenses=oe.license.flattened_licenses(d.getVar('LICENSE', True), choose_licenses) 295 licenses=oe.license.flattened_licenses(d.getVar('LICENSE', True), choose_licenses)
296 296
297 for onelicense in licenses: 297 for onelicense in licenses:
298 if not include_license(onelicense): 298 if not include_license(onelicense):
299 return True 299 return True
300 return False 300 return False
301 301
302 302
@@ -361,7 +361,6 @@ def check_license_flags(d):
361 return unmatched_flag 361 return unmatched_flag
362 return None 362 return None
363 363
364
365SSTATETASKS += "do_populate_lic" 364SSTATETASKS += "do_populate_lic"
366do_populate_lic[sstate-name] = "populate-lic" 365do_populate_lic[sstate-name] = "populate-lic"
367do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" 366do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"