diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-11-25 15:28:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-30 15:48:09 +0000 |
commit | 1fce7ecbbb004a5ad82da3eef79cfd52b276708d (patch) | |
tree | dc19c8ecb8e0b04ba5eafd27a7679bb55585a868 /bitbake/lib/bb/data.py | |
parent | 1d0c124cdf0282b8d139063409e40982f0ec9888 (diff) | |
download | poky-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/data.py')
-rw-r--r-- | bitbake/lib/bb/data.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index 1a2946f943..02a1140d0f 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py | |||
@@ -121,7 +121,7 @@ def inheritFromOS(d, savedenv, permitted): | |||
121 | for s in savedenv.keys(): | 121 | for s in savedenv.keys(): |
122 | if s in permitted: | 122 | if s in permitted: |
123 | try: | 123 | try: |
124 | d.setVar(s, savedenv.getVar(s, True), op = 'from env') | 124 | d.setVar(s, savedenv.getVar(s), op = 'from env') |
125 | if s in exportlist: | 125 | if s in exportlist: |
126 | d.setVarFlag(s, "export", True, op = 'auto env export') | 126 | d.setVarFlag(s, "export", True, op = 'auto env export') |
127 | except TypeError: | 127 | except TypeError: |
@@ -141,7 +141,7 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False): | |||
141 | try: | 141 | try: |
142 | if all: | 142 | if all: |
143 | oval = d.getVar(var, False) | 143 | oval = d.getVar(var, False) |
144 | val = d.getVar(var, True) | 144 | val = d.getVar(var) |
145 | except (KeyboardInterrupt, bb.build.FuncFailed): | 145 | except (KeyboardInterrupt, bb.build.FuncFailed): |
146 | raise | 146 | raise |
147 | except Exception as exc: | 147 | except Exception as exc: |
@@ -208,9 +208,9 @@ def exported_vars(d): | |||
208 | k = list(exported_keys(d)) | 208 | k = list(exported_keys(d)) |
209 | for key in k: | 209 | for key in k: |
210 | try: | 210 | try: |
211 | value = d.getVar(key, True) | 211 | value = d.getVar(key) |
212 | except Exception as err: | 212 | except Exception as err: |
213 | bb.warn("%s: Unable to export ${%s}: %s" % (d.getVar("FILE", True), key, err)) | 213 | bb.warn("%s: Unable to export ${%s}: %s" % (d.getVar("FILE"), key, err)) |
214 | continue | 214 | continue |
215 | 215 | ||
216 | if value is not None: | 216 | if value is not None: |
@@ -225,7 +225,7 @@ def emit_func(func, o=sys.__stdout__, d = init()): | |||
225 | 225 | ||
226 | o.write('\n') | 226 | o.write('\n') |
227 | emit_var(func, o, d, False) and o.write('\n') | 227 | emit_var(func, o, d, False) and o.write('\n') |
228 | newdeps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func, True)) | 228 | newdeps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func)) |
229 | newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split()) | 229 | newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split()) |
230 | seen = set() | 230 | seen = set() |
231 | while newdeps: | 231 | while newdeps: |
@@ -235,7 +235,7 @@ def emit_func(func, o=sys.__stdout__, d = init()): | |||
235 | for dep in deps: | 235 | for dep in deps: |
236 | if d.getVarFlag(dep, "func", False) and not d.getVarFlag(dep, "python", False): | 236 | if d.getVarFlag(dep, "func", False) and not d.getVarFlag(dep, "python", False): |
237 | emit_var(dep, o, d, False) and o.write('\n') | 237 | emit_var(dep, o, d, False) and o.write('\n') |
238 | newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep, True)) | 238 | newdeps |= bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep)) |
239 | newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split()) | 239 | newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split()) |
240 | newdeps -= seen | 240 | newdeps -= seen |
241 | 241 | ||
@@ -295,7 +295,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d): | |||
295 | def handle_contains(value, contains, d): | 295 | def handle_contains(value, contains, d): |
296 | newvalue = "" | 296 | newvalue = "" |
297 | for k in sorted(contains): | 297 | for k in sorted(contains): |
298 | l = (d.getVar(k, True) or "").split() | 298 | l = (d.getVar(k) or "").split() |
299 | for word in sorted(contains[k]): | 299 | for word in sorted(contains[k]): |
300 | if word in l: | 300 | if word in l: |
301 | newvalue += "\n%s{%s} = Set" % (k, word) | 301 | newvalue += "\n%s{%s} = Set" % (k, word) |
@@ -313,7 +313,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d): | |||
313 | if varflags.get("python"): | 313 | if varflags.get("python"): |
314 | parser = bb.codeparser.PythonParser(key, logger) | 314 | parser = bb.codeparser.PythonParser(key, logger) |
315 | if value and "\t" in value: | 315 | if value and "\t" in value: |
316 | logger.warning("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True))) | 316 | logger.warning("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE"))) |
317 | parser.parse_python(value, filename=varflags.get("filename"), lineno=varflags.get("lineno")) | 317 | parser.parse_python(value, filename=varflags.get("filename"), lineno=varflags.get("lineno")) |
318 | deps = deps | parser.references | 318 | deps = deps | parser.references |
319 | deps = deps | (keys & parser.execs) | 319 | deps = deps | (keys & parser.execs) |
@@ -368,7 +368,7 @@ def generate_dependencies(d): | |||
368 | 368 | ||
369 | keys = set(key for key in d if not key.startswith("__")) | 369 | keys = set(key for key in d if not key.startswith("__")) |
370 | shelldeps = set(key for key in d.getVar("__exportlist", False) if d.getVarFlag(key, "export", False) and not d.getVarFlag(key, "unexport", False)) | 370 | shelldeps = set(key for key in d.getVar("__exportlist", False) if d.getVarFlag(key, "export", False) and not d.getVarFlag(key, "unexport", False)) |
371 | varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS', True) | 371 | varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS') |
372 | 372 | ||
373 | deps = {} | 373 | deps = {} |
374 | values = {} | 374 | values = {} |