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/parse | |
| 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/parse')
| -rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/ast.py | 12 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 2 | ||||
| -rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index 26ae7ead86..a2952ecc0f 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py | |||
| @@ -123,7 +123,7 @@ def init_parser(d): | |||
| 123 | 123 | ||
| 124 | def resolve_file(fn, d): | 124 | def resolve_file(fn, d): |
| 125 | if not os.path.isabs(fn): | 125 | if not os.path.isabs(fn): |
| 126 | bbpath = d.getVar("BBPATH", True) | 126 | bbpath = d.getVar("BBPATH") |
| 127 | newfn, attempts = bb.utils.which(bbpath, fn, history=True) | 127 | newfn, attempts = bb.utils.which(bbpath, fn, history=True) |
| 128 | for af in attempts: | 128 | for af in attempts: |
| 129 | mark_dependency(d, af) | 129 | mark_dependency(d, af) |
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index fa83b18981..a3990e5b3e 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
| @@ -407,7 +407,7 @@ def _expand_versions(versions): | |||
| 407 | versions = itertools.chain(newversions, versions) | 407 | versions = itertools.chain(newversions, versions) |
| 408 | 408 | ||
| 409 | def multi_finalize(fn, d): | 409 | def multi_finalize(fn, d): |
| 410 | appends = (d.getVar("__BBAPPEND", True) or "").split() | 410 | appends = (d.getVar("__BBAPPEND") or "").split() |
| 411 | for append in appends: | 411 | for append in appends: |
| 412 | logger.debug(1, "Appending .bbappend file %s to %s", append, fn) | 412 | logger.debug(1, "Appending .bbappend file %s to %s", append, fn) |
| 413 | bb.parse.BBHandler.handle(append, d, True) | 413 | bb.parse.BBHandler.handle(append, d, True) |
| @@ -422,16 +422,16 @@ def multi_finalize(fn, d): | |||
| 422 | d.setVar("__SKIPPED", e.args[0]) | 422 | d.setVar("__SKIPPED", e.args[0]) |
| 423 | datastores = {"": safe_d} | 423 | datastores = {"": safe_d} |
| 424 | 424 | ||
| 425 | versions = (d.getVar("BBVERSIONS", True) or "").split() | 425 | versions = (d.getVar("BBVERSIONS") or "").split() |
| 426 | if versions: | 426 | if versions: |
| 427 | pv = orig_pv = d.getVar("PV", True) | 427 | pv = orig_pv = d.getVar("PV") |
| 428 | baseversions = {} | 428 | baseversions = {} |
| 429 | 429 | ||
| 430 | def verfunc(ver, d, pv_d = None): | 430 | def verfunc(ver, d, pv_d = None): |
| 431 | if pv_d is None: | 431 | if pv_d is None: |
| 432 | pv_d = d | 432 | pv_d = d |
| 433 | 433 | ||
| 434 | overrides = d.getVar("OVERRIDES", True).split(":") | 434 | overrides = d.getVar("OVERRIDES").split(":") |
| 435 | pv_d.setVar("PV", ver) | 435 | pv_d.setVar("PV", ver) |
| 436 | overrides.append(ver) | 436 | overrides.append(ver) |
| 437 | bpv = baseversions.get(ver) or orig_pv | 437 | bpv = baseversions.get(ver) or orig_pv |
| @@ -466,7 +466,7 @@ def multi_finalize(fn, d): | |||
| 466 | 466 | ||
| 467 | _create_variants(datastores, versions, verfunc, onlyfinalise) | 467 | _create_variants(datastores, versions, verfunc, onlyfinalise) |
| 468 | 468 | ||
| 469 | extended = d.getVar("BBCLASSEXTEND", True) or "" | 469 | extended = d.getVar("BBCLASSEXTEND") or "" |
| 470 | if extended: | 470 | if extended: |
| 471 | # the following is to support bbextends with arguments, for e.g. multilib | 471 | # the following is to support bbextends with arguments, for e.g. multilib |
| 472 | # an example is as follows: | 472 | # an example is as follows: |
| @@ -484,7 +484,7 @@ def multi_finalize(fn, d): | |||
| 484 | else: | 484 | else: |
| 485 | extendedmap[ext] = ext | 485 | extendedmap[ext] = ext |
| 486 | 486 | ||
| 487 | pn = d.getVar("PN", True) | 487 | pn = d.getVar("PN") |
| 488 | def extendfunc(name, d): | 488 | def extendfunc(name, d): |
| 489 | if name != extendedmap[name]: | 489 | if name != extendedmap[name]: |
| 490 | d.setVar("BBEXTENDCURR", extendedmap[name]) | 490 | d.setVar("BBEXTENDCURR", extendedmap[name]) |
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index c54a07979d..f2a215105b 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
| @@ -66,7 +66,7 @@ def inherit(files, fn, lineno, d): | |||
| 66 | file = os.path.join('classes', '%s.bbclass' % file) | 66 | file = os.path.join('classes', '%s.bbclass' % file) |
| 67 | 67 | ||
| 68 | if not os.path.isabs(file): | 68 | if not os.path.isabs(file): |
| 69 | bbpath = d.getVar("BBPATH", True) | 69 | bbpath = d.getVar("BBPATH") |
| 70 | abs_fn, attempts = bb.utils.which(bbpath, file, history=True) | 70 | abs_fn, attempts = bb.utils.which(bbpath, file, history=True) |
| 71 | for af in attempts: | 71 | for af in attempts: |
| 72 | if af != abs_fn: | 72 | if af != abs_fn: |
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 875250de40..5759cb20ed 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
| @@ -83,16 +83,16 @@ def include(parentfn, fn, lineno, data, error_out): | |||
| 83 | 83 | ||
| 84 | if not os.path.isabs(fn): | 84 | if not os.path.isabs(fn): |
| 85 | dname = os.path.dirname(parentfn) | 85 | dname = os.path.dirname(parentfn) |
| 86 | bbpath = "%s:%s" % (dname, data.getVar("BBPATH", True)) | 86 | bbpath = "%s:%s" % (dname, data.getVar("BBPATH")) |
| 87 | abs_fn, attempts = bb.utils.which(bbpath, fn, history=True) | 87 | abs_fn, attempts = bb.utils.which(bbpath, fn, history=True) |
| 88 | if abs_fn and bb.parse.check_dependency(data, abs_fn): | 88 | if abs_fn and bb.parse.check_dependency(data, abs_fn): |
| 89 | logger.warning("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE', True))) | 89 | logger.warning("Duplicate inclusion for %s in %s" % (abs_fn, data.getVar('FILE'))) |
| 90 | for af in attempts: | 90 | for af in attempts: |
| 91 | bb.parse.mark_dependency(data, af) | 91 | bb.parse.mark_dependency(data, af) |
| 92 | if abs_fn: | 92 | if abs_fn: |
| 93 | fn = abs_fn | 93 | fn = abs_fn |
| 94 | elif bb.parse.check_dependency(data, fn): | 94 | elif bb.parse.check_dependency(data, fn): |
| 95 | logger.warning("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE', True))) | 95 | logger.warning("Duplicate inclusion for %s in %s" % (fn, data.getVar('FILE'))) |
| 96 | 96 | ||
| 97 | try: | 97 | try: |
| 98 | bb.parse.handle(fn, data, True) | 98 | bb.parse.handle(fn, data, True) |
