summaryrefslogtreecommitdiffstats
path: root/meta/classes/utils.bbclass
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc4e2c59088765d1f1de7ec57cde91980f887c2ff (patch)
treea2fda8ac5916fb59a711e9220c2177008cca9347 /meta/classes/utils.bbclass
parentd5e67725ac11e3296cad104470931ffa16824b90 (diff)
downloadpoky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) 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/utils.bbclass')
-rw-r--r--meta/classes/utils.bbclass30
1 files changed, 15 insertions, 15 deletions
diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index dbb5e4cbbc..640daed4a8 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -41,9 +41,9 @@ def oe_filter_out(f, str, d):
41 41
42def machine_paths(d): 42def machine_paths(d):
43 """List any existing machine specific filespath directories""" 43 """List any existing machine specific filespath directories"""
44 machine = d.getVar("MACHINE", True) 44 machine = d.getVar("MACHINE")
45 filespathpkg = d.getVar("FILESPATHPKG", True).split(":") 45 filespathpkg = d.getVar("FILESPATHPKG").split(":")
46 for basepath in d.getVar("FILESPATHBASE", True).split(":"): 46 for basepath in d.getVar("FILESPATHBASE").split(":"):
47 for pkgpath in filespathpkg: 47 for pkgpath in filespathpkg:
48 machinepath = os.path.join(basepath, pkgpath, machine) 48 machinepath = os.path.join(basepath, pkgpath, machine)
49 if os.path.isdir(machinepath): 49 if os.path.isdir(machinepath):
@@ -52,7 +52,7 @@ def machine_paths(d):
52def is_machine_specific(d): 52def is_machine_specific(d):
53 """Determine whether the current recipe is machine specific""" 53 """Determine whether the current recipe is machine specific"""
54 machinepaths = set(machine_paths(d)) 54 machinepaths = set(machine_paths(d))
55 srcuri = d.getVar("SRC_URI", True).split() 55 srcuri = d.getVar("SRC_URI").split()
56 for url in srcuri: 56 for url in srcuri:
57 fetcher = bb.fetch2.Fetch([srcuri], d) 57 fetcher = bb.fetch2.Fetch([srcuri], d)
58 if url.startswith("file://"): 58 if url.startswith("file://"):
@@ -315,14 +315,14 @@ def explode_deps(s):
315 315
316def base_set_filespath(path, d): 316def base_set_filespath(path, d):
317 filespath = [] 317 filespath = []
318 extrapaths = (d.getVar("FILESEXTRAPATHS", True) or "") 318 extrapaths = (d.getVar("FILESEXTRAPATHS") or "")
319 # Remove default flag which was used for checking 319 # Remove default flag which was used for checking
320 extrapaths = extrapaths.replace("__default:", "") 320 extrapaths = extrapaths.replace("__default:", "")
321 # Don't prepend empty strings to the path list 321 # Don't prepend empty strings to the path list
322 if extrapaths != "": 322 if extrapaths != "":
323 path = extrapaths.split(":") + path 323 path = extrapaths.split(":") + path
324 # The ":" ensures we have an 'empty' override 324 # The ":" ensures we have an 'empty' override
325 overrides = (":" + (d.getVar("FILESOVERRIDES", True) or "")).split(":") 325 overrides = (":" + (d.getVar("FILESOVERRIDES") or "")).split(":")
326 overrides.reverse() 326 overrides.reverse()
327 for o in overrides: 327 for o in overrides:
328 for p in path: 328 for p in path:
@@ -333,7 +333,7 @@ def base_set_filespath(path, d):
333def extend_variants(d, var, extend, delim=':'): 333def extend_variants(d, var, extend, delim=':'):
334 """Return a string of all bb class extend variants for the given extend""" 334 """Return a string of all bb class extend variants for the given extend"""
335 variants = [] 335 variants = []
336 whole = d.getVar(var, True) or "" 336 whole = d.getVar(var) or ""
337 for ext in whole.split(): 337 for ext in whole.split():
338 eext = ext.split(delim) 338 eext = ext.split(delim)
339 if len(eext) > 1 and eext[0] == extend: 339 if len(eext) > 1 and eext[0] == extend:
@@ -341,7 +341,7 @@ def extend_variants(d, var, extend, delim=':'):
341 return " ".join(variants) 341 return " ".join(variants)
342 342
343def multilib_pkg_extend(d, pkg): 343def multilib_pkg_extend(d, pkg):
344 variants = (d.getVar("MULTILIB_VARIANTS", True) or "").split() 344 variants = (d.getVar("MULTILIB_VARIANTS") or "").split()
345 if not variants: 345 if not variants:
346 return pkg 346 return pkg
347 pkgs = pkg 347 pkgs = pkg
@@ -352,21 +352,21 @@ def multilib_pkg_extend(d, pkg):
352def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '): 352def all_multilib_tune_values(d, var, unique = True, need_split = True, delim = ' '):
353 """Return a string of all ${var} in all multilib tune configuration""" 353 """Return a string of all ${var} in all multilib tune configuration"""
354 values = [] 354 values = []
355 value = d.getVar(var, True) or "" 355 value = d.getVar(var) or ""
356 if value != "": 356 if value != "":
357 if need_split: 357 if need_split:
358 for item in value.split(delim): 358 for item in value.split(delim):
359 values.append(item) 359 values.append(item)
360 else: 360 else:
361 values.append(value) 361 values.append(value)
362 variants = d.getVar("MULTILIB_VARIANTS", True) or "" 362 variants = d.getVar("MULTILIB_VARIANTS") or ""
363 for item in variants.split(): 363 for item in variants.split():
364 localdata = bb.data.createCopy(d) 364 localdata = bb.data.createCopy(d)
365 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item 365 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
366 localdata.setVar("OVERRIDES", overrides) 366 localdata.setVar("OVERRIDES", overrides)
367 localdata.setVar("MLPREFIX", item + "-") 367 localdata.setVar("MLPREFIX", item + "-")
368 bb.data.update_data(localdata) 368 bb.data.update_data(localdata)
369 value = localdata.getVar(var, True) or "" 369 value = localdata.getVar(var) or ""
370 if value != "": 370 if value != "":
371 if need_split: 371 if need_split:
372 for item in value.split(delim): 372 for item in value.split(delim):
@@ -402,21 +402,21 @@ def all_multilib_tune_list(vars, d):
402 newoverrides.append(o) 402 newoverrides.append(o)
403 localdata.setVar("OVERRIDES", ":".join(newoverrides)) 403 localdata.setVar("OVERRIDES", ":".join(newoverrides))
404 localdata.setVar("MLPREFIX", "") 404 localdata.setVar("MLPREFIX", "")
405 origdefault = localdata.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL", True) 405 origdefault = localdata.getVar("DEFAULTTUNE_MULTILIB_ORIGINAL")
406 if origdefault: 406 if origdefault:
407 localdata.setVar("DEFAULTTUNE", origdefault) 407 localdata.setVar("DEFAULTTUNE", origdefault)
408 bb.data.update_data(localdata) 408 bb.data.update_data(localdata)
409 values['ml'] = [''] 409 values['ml'] = ['']
410 for v in vars: 410 for v in vars:
411 values[v].append(localdata.getVar(v, True)) 411 values[v].append(localdata.getVar(v))
412 variants = d.getVar("MULTILIB_VARIANTS", True) or "" 412 variants = d.getVar("MULTILIB_VARIANTS") or ""
413 for item in variants.split(): 413 for item in variants.split():
414 localdata = bb.data.createCopy(d) 414 localdata = bb.data.createCopy(d)
415 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item 415 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
416 localdata.setVar("OVERRIDES", overrides) 416 localdata.setVar("OVERRIDES", overrides)
417 localdata.setVar("MLPREFIX", item + "-") 417 localdata.setVar("MLPREFIX", item + "-")
418 bb.data.update_data(localdata) 418 bb.data.update_data(localdata)
419 values[v].append(localdata.getVar(v, True)) 419 values[v].append(localdata.getVar(v))
420 values['ml'].append(item) 420 values['ml'].append(item)
421 return values 421 return values
422 422