summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-11-25 15:28:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:48:09 +0000
commit1fce7ecbbb004a5ad82da3eef79cfd52b276708d (patch)
treedc19c8ecb8e0b04ba5eafd27a7679bb55585a868 /bitbake/lib/bb/utils.py
parent1d0c124cdf0282b8d139063409e40982f0ec9888 (diff)
downloadpoky-1fce7ecbbb004a5ad82da3eef79cfd52b276708d.tar.gz
bitbake: bitbake: 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\) (Bitbake rev: 3b45c479de8640f92dd1d9f147b02e1eecfaadc8) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 729848a1cc..c4b25b50ac 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -665,7 +665,7 @@ def build_environment(d):
665 for var in bb.data.keys(d): 665 for var in bb.data.keys(d):
666 export = d.getVarFlag(var, "export", False) 666 export = d.getVarFlag(var, "export", False)
667 if export: 667 if export:
668 os.environ[var] = d.getVar(var, True) or "" 668 os.environ[var] = d.getVar(var) or ""
669 669
670def _check_unsafe_delete_path(path): 670def _check_unsafe_delete_path(path):
671 """ 671 """
@@ -953,7 +953,7 @@ def contains(variable, checkvalues, truevalue, falsevalue, d):
953 Arguments: 953 Arguments:
954 954
955 variable -- the variable name. This will be fetched and expanded (using 955 variable -- the variable name. This will be fetched and expanded (using
956 d.getVar(variable, True)) and then split into a set(). 956 d.getVar(variable)) and then split into a set().
957 957
958 checkvalues -- if this is a string it is split on whitespace into a set(), 958 checkvalues -- if this is a string it is split on whitespace into a set(),
959 otherwise coerced directly into a set(). 959 otherwise coerced directly into a set().
@@ -966,7 +966,7 @@ def contains(variable, checkvalues, truevalue, falsevalue, d):
966 d -- the data store. 966 d -- the data store.
967 """ 967 """
968 968
969 val = d.getVar(variable, True) 969 val = d.getVar(variable)
970 if not val: 970 if not val:
971 return falsevalue 971 return falsevalue
972 val = set(val.split()) 972 val = set(val.split())
@@ -979,7 +979,7 @@ def contains(variable, checkvalues, truevalue, falsevalue, d):
979 return falsevalue 979 return falsevalue
980 980
981def contains_any(variable, checkvalues, truevalue, falsevalue, d): 981def contains_any(variable, checkvalues, truevalue, falsevalue, d):
982 val = d.getVar(variable, True) 982 val = d.getVar(variable)
983 if not val: 983 if not val:
984 return falsevalue 984 return falsevalue
985 val = set(val.split()) 985 val = set(val.split())
@@ -1378,10 +1378,10 @@ def edit_bblayers_conf(bblayers_conf, add, remove):
1378 1378
1379def get_file_layer(filename, d): 1379def get_file_layer(filename, d):
1380 """Determine the collection (as defined by a layer's layer.conf file) containing the specified file""" 1380 """Determine the collection (as defined by a layer's layer.conf file) containing the specified file"""
1381 collections = (d.getVar('BBFILE_COLLECTIONS', True) or '').split() 1381 collections = (d.getVar('BBFILE_COLLECTIONS') or '').split()
1382 collection_res = {} 1382 collection_res = {}
1383 for collection in collections: 1383 for collection in collections:
1384 collection_res[collection] = d.getVar('BBFILE_PATTERN_%s' % collection, True) or '' 1384 collection_res[collection] = d.getVar('BBFILE_PATTERN_%s' % collection) or ''
1385 1385
1386 def path_to_layer(path): 1386 def path_to_layer(path):
1387 # Use longest path so we handle nested layers 1387 # Use longest path so we handle nested layers
@@ -1394,7 +1394,7 @@ def get_file_layer(filename, d):
1394 return match 1394 return match
1395 1395
1396 result = None 1396 result = None
1397 bbfiles = (d.getVar('BBFILES', True) or '').split() 1397 bbfiles = (d.getVar('BBFILES') or '').split()
1398 bbfilesmatch = False 1398 bbfilesmatch = False
1399 for bbfilesentry in bbfiles: 1399 for bbfilesentry in bbfiles:
1400 if fnmatch.fnmatch(filename, bbfilesentry): 1400 if fnmatch.fnmatch(filename, bbfilesentry):
@@ -1471,7 +1471,7 @@ def export_proxies(d):
1471 if v in os.environ.keys(): 1471 if v in os.environ.keys():
1472 exported = True 1472 exported = True
1473 else: 1473 else:
1474 v_proxy = d.getVar(v, True) 1474 v_proxy = d.getVar(v)
1475 if v_proxy is not None: 1475 if v_proxy is not None:
1476 os.environ[v] = v_proxy 1476 os.environ[v] = v_proxy
1477 exported = True 1477 exported = True