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-19 22:43:48 +0100 |
commit | 659ef95c9b8aced3c4ded81c48bcc0fbde4d429f (patch) | |
tree | c63666710636bf12d25ef5a491f5d1abbcca4f96 /lib/bb/build.py | |
parent | 5ecd6a671c088f270d5f49093f8da83278fc0aa9 (diff) | |
download | bitbake-contrib-659ef95c9b8aced3c4ded81c48bcc0fbde4d429f.tar.gz |
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 *`
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r-- | lib/bb/build.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py index 0f6aa1a14..14dc5e061 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -159,7 +159,7 @@ class LogTee(object): def exec_func(func, d, dirs = None): """Execute a BB 'function'""" - body = d.getVar(func) + body = d.getVar(func, False) if not body: if body is None: logger.warn("Function %s doesn't exist", func) @@ -646,7 +646,7 @@ def stampfile(taskname, d, file_name = None): return stamp_internal(taskname, d, file_name) def add_tasks(tasklist, deltasklist, d): - task_deps = d.getVar('_task_deps') + task_deps = d.getVar('_task_deps', False) if not task_deps: task_deps = {} if not 'tasks' in task_deps: @@ -696,7 +696,7 @@ def addtask(task, before, after, d): task = "do_" + task d.setVarFlag(task, "task", 1) - bbtasks = d.getVar('__BBTASKS') or [] + bbtasks = d.getVar('__BBTASKS', False) or [] if not task in bbtasks: bbtasks.append(task) d.setVar('__BBTASKS', bbtasks) @@ -719,7 +719,7 @@ def deltask(task, d): if task[:3] != "do_": task = "do_" + task - bbtasks = d.getVar('__BBDELTASKS') or [] + bbtasks = d.getVar('__BBDELTASKS', False) or [] if not task in bbtasks: bbtasks.append(task) d.setVar('__BBDELTASKS', bbtasks) |