diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-18 15:14:19 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:57:53 +0100 |
commit | 69b69193411849de71cf7c81735c3239e28a2940 (patch) | |
tree | 054081264a49c9aa3002bc358ab0c4d7b7239015 /bitbake/lib/bb/parse/parse_py/ConfHandler.py | |
parent | 86d30d756a60d181a95cf07041920a367a0cd0ba (diff) | |
download | poky-69b69193411849de71cf7c81735c3239e28a2940.tar.gz |
bitbake: bitbake: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.
This patch was mostly made using the command:
sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`
(Bitbake rev: 659ef95c9b8aced3c4ded81c48bcc0fbde4d429f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py')
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 8d7a0d562a..250a557cb4 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -58,7 +58,7 @@ __require_regexp__ = re.compile( r"require\s+(.+)" ) | |||
58 | __export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" ) | 58 | __export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/]+)$" ) |
59 | 59 | ||
60 | def init(data): | 60 | def init(data): |
61 | topdir = data.getVar('TOPDIR') | 61 | topdir = data.getVar('TOPDIR', False) |
62 | if not topdir: | 62 | if not topdir: |
63 | data.setVar('TOPDIR', os.getcwd()) | 63 | data.setVar('TOPDIR', os.getcwd()) |
64 | 64 | ||
@@ -112,7 +112,7 @@ def handle(fn, data, include): | |||
112 | if include == 0: | 112 | if include == 0: |
113 | oldfile = None | 113 | oldfile = None |
114 | else: | 114 | else: |
115 | oldfile = data.getVar('FILE') | 115 | oldfile = data.getVar('FILE', False) |
116 | 116 | ||
117 | abs_fn = resolve_file(fn, data) | 117 | abs_fn = resolve_file(fn, data) |
118 | f = open(abs_fn, 'r') | 118 | f = open(abs_fn, 'r') |