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:47:45 +0000 |
commit | 3b45c479de8640f92dd1d9f147b02e1eecfaadc8 (patch) | |
tree | ba0d71bdd8028442fd06002dc09e66ddf8291f6d /lib/bb/parse | |
parent | 3cb0d1c78b4c2e4f251a59b86c8da583828ad08b (diff) | |
download | bitbake-contrib-3b45c479de8640f92dd1d9f147b02e1eecfaadc8.tar.gz |
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\)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse')
-rw-r--r-- | lib/bb/parse/__init__.py | 2 | ||||
-rw-r--r-- | lib/bb/parse/ast.py | 12 | ||||
-rw-r--r-- | lib/bb/parse/parse_py/BBHandler.py | 2 | ||||
-rw-r--r-- | lib/bb/parse/parse_py/ConfHandler.py | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py index 26ae7ead8..a2952ecc0 100644 --- a/lib/bb/parse/__init__.py +++ b/lib/bb/parse/__init__.py @@ -123,7 +123,7 @@ def init_parser(d): def resolve_file(fn, d): if not os.path.isabs(fn): - bbpath = d.getVar("BBPATH", True) + bbpath = d.getVar("BBPATH") newfn, attempts = bb.utils.which(bbpath, fn, history=True) for af in attempts: mark_dependency(d, af) diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py index fa83b1898..a3990e5b3 100644 --- a/lib/bb/parse/ast.py +++ b/lib/bb/parse/ast.py @@ -407,7 +407,7 @@ def _expand_versions(versions): versions = itertools.chain(newversions, versions) def multi_finalize(fn, d): - appends = (d.getVar("__BBAPPEND", True) or "").split() + appends = (d.getVar("__BBAPPEND") or "").split() for append in appends: logger.debug(1, "Appending .bbappend file %s to %s", append, fn) bb.parse.BBHandler.handle(append, d, True) @@ -422,16 +422,16 @@ def multi_finalize(fn, d): d.setVar("__SKIPPED", e.args[0]) datastores = {"": safe_d} - versions = (d.getVar("BBVERSIONS", True) or "").split() + versions = (d.getVar("BBVERSIONS") or "").split() if versions: - pv = orig_pv = d.getVar("PV", True) + pv = orig_pv = d.getVar("PV") baseversions = {} def verfunc(ver, d, pv_d = None): if pv_d is None: pv_d = d - overrides = d.getVar("OVERRIDES", True).split(":") + overrides = d.getVar("OVERRIDES").split(":") pv_d.setVar("PV", ver) overrides.append(ver) bpv = baseversions.get(ver) or orig_pv @@ -466,7 +466,7 @@ def multi_finalize(fn, d): _create_variants(datastores, versions, verfunc, onlyfinalise) - extended = d.getVar("BBCLASSEXTEND", True) or "" + extended = d.getVar("BBCLASSEXTEND") or "" if extended: # the following is to support bbextends with arguments, for e.g. multilib # an example is as follows: @@ -484,7 +484,7 @@ def multi_finalize(fn, d): else: extendedmap[ext] = ext - pn = d.getVar("PN", True) + pn = d.getVar("PN") def extendfunc(name, d): if name != extendedmap[name]: d.setVar("BBEXTENDCURR", extendedmap[name]) diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py index c54a07979..f2a215105 100644 --- a/lib/bb/parse/parse_py/BBHandler.py +++ b/lib/bb/parse/parse_py/BBHandler.py @@ -66,7 +66,7 @@ def inherit(files, fn, lineno, d): file = os.path.join('classes', '%s.bbclass' % file) if not os.path.isabs(file): - bbpath = d.getVar("BBPATH", True) + bbpath = d.getVar("BBPATH") abs_fn, attempts = bb.utils.which(bbpath, file, history=True) for af in attempts: if af != abs_fn: diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py index 875250de4..5759cb20e 100644 --- a/lib/bb/parse/parse_py/ConfHandler.py +++ b/lib/bb/parse/parse_py/ConfHandler.py @@ -83,16 +83,16 @@ def include(parentfn, fn, lineno, data, error_out): if not os.path.isabs(fn): dname = os.path.dirname(parentfn) - bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True)) + bbpath = "%s:%s" % (dname, data.getVar("BBPATH")) abs_fn, attempts = bb.utils.which(bbpath, fn, history=True) if abs_fn and bb.parse.check_dependency(data, abs_fn): - logger.warning("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True))) + logger.warning("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE'))) for af in attempts: bb.parse.mark_dependency(data, af) if abs_fn: fn = abs_fn elif bb.parse.check_dependency(data, fn): - logger.warning("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True))) + logger.warning("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE'))) try: bb.parse.handle(fn, data, True) |