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/build.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/build.py')
-rw-r--r-- | bitbake/lib/bb/build.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 0f6aa1a14c..14dc5e0619 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -159,7 +159,7 @@ class LogTee(object): | |||
159 | def exec_func(func, d, dirs = None): | 159 | def exec_func(func, d, dirs = None): |
160 | """Execute a BB 'function'""" | 160 | """Execute a BB 'function'""" |
161 | 161 | ||
162 | body = d.getVar(func) | 162 | body = d.getVar(func, False) |
163 | if not body: | 163 | if not body: |
164 | if body is None: | 164 | if body is None: |
165 | logger.warn("Function %s doesn't exist", func) | 165 | logger.warn("Function %s doesn't exist", func) |
@@ -646,7 +646,7 @@ def stampfile(taskname, d, file_name = None): | |||
646 | return stamp_internal(taskname, d, file_name) | 646 | return stamp_internal(taskname, d, file_name) |
647 | 647 | ||
648 | def add_tasks(tasklist, deltasklist, d): | 648 | def add_tasks(tasklist, deltasklist, d): |
649 | task_deps = d.getVar('_task_deps') | 649 | task_deps = d.getVar('_task_deps', False) |
650 | if not task_deps: | 650 | if not task_deps: |
651 | task_deps = {} | 651 | task_deps = {} |
652 | if not 'tasks' in task_deps: | 652 | if not 'tasks' in task_deps: |
@@ -696,7 +696,7 @@ def addtask(task, before, after, d): | |||
696 | task = "do_" + task | 696 | task = "do_" + task |
697 | 697 | ||
698 | d.setVarFlag(task, "task", 1) | 698 | d.setVarFlag(task, "task", 1) |
699 | bbtasks = d.getVar('__BBTASKS') or [] | 699 | bbtasks = d.getVar('__BBTASKS', False) or [] |
700 | if not task in bbtasks: | 700 | if not task in bbtasks: |
701 | bbtasks.append(task) | 701 | bbtasks.append(task) |
702 | d.setVar('__BBTASKS', bbtasks) | 702 | d.setVar('__BBTASKS', bbtasks) |
@@ -719,7 +719,7 @@ def deltask(task, d): | |||
719 | if task[:3] != "do_": | 719 | if task[:3] != "do_": |
720 | task = "do_" + task | 720 | task = "do_" + task |
721 | 721 | ||
722 | bbtasks = d.getVar('__BBDELTASKS') or [] | 722 | bbtasks = d.getVar('__BBDELTASKS', False) or [] |
723 | if not task in bbtasks: | 723 | if not task in bbtasks: |
724 | bbtasks.append(task) | 724 | bbtasks.append(task) |
725 | d.setVar('__BBDELTASKS', bbtasks) | 725 | d.setVar('__BBDELTASKS', bbtasks) |