summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/parse_py/BBHandler.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-18 15:14:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:57:53 +0100
commit69b69193411849de71cf7c81735c3239e28a2940 (patch)
tree054081264a49c9aa3002bc358ab0c4d7b7239015 /bitbake/lib/bb/parse/parse_py/BBHandler.py
parent86d30d756a60d181a95cf07041920a367a0cd0ba (diff)
downloadpoky-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/BBHandler.py')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 03109dfbb2..ec097baf73 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -69,7 +69,7 @@ def supports(fn, d):
69 return os.path.splitext(fn)[-1] in [".bb", ".bbclass", ".inc"] 69 return os.path.splitext(fn)[-1] in [".bb", ".bbclass", ".inc"]
70 70
71def inherit(files, fn, lineno, d): 71def inherit(files, fn, lineno, d):
72 __inherit_cache = d.getVar('__inherit_cache') or [] 72 __inherit_cache = d.getVar('__inherit_cache', False) or []
73 files = d.expand(files).split() 73 files = d.expand(files).split()
74 for file in files: 74 for file in files:
75 if not os.path.isabs(file) and not file.endswith(".bbclass"): 75 if not os.path.isabs(file) and not file.endswith(".bbclass"):
@@ -89,7 +89,7 @@ def inherit(files, fn, lineno, d):
89 __inherit_cache.append( file ) 89 __inherit_cache.append( file )
90 d.setVar('__inherit_cache', __inherit_cache) 90 d.setVar('__inherit_cache', __inherit_cache)
91 include(fn, file, lineno, d, "inherit") 91 include(fn, file, lineno, d, "inherit")
92 __inherit_cache = d.getVar('__inherit_cache') or [] 92 __inherit_cache = d.getVar('__inherit_cache', False) or []
93 93
94def get_statements(filename, absolute_filename, base_name): 94def get_statements(filename, absolute_filename, base_name):
95 global cached_statements 95 global cached_statements
@@ -129,13 +129,13 @@ def handle(fn, d, include):
129 129
130 if ext == ".bbclass": 130 if ext == ".bbclass":
131 __classname__ = root 131 __classname__ = root
132 __inherit_cache = d.getVar('__inherit_cache') or [] 132 __inherit_cache = d.getVar('__inherit_cache', False) or []
133 if not fn in __inherit_cache: 133 if not fn in __inherit_cache:
134 __inherit_cache.append(fn) 134 __inherit_cache.append(fn)
135 d.setVar('__inherit_cache', __inherit_cache) 135 d.setVar('__inherit_cache', __inherit_cache)
136 136
137 if include != 0: 137 if include != 0:
138 oldfile = d.getVar('FILE') 138 oldfile = d.getVar('FILE', False)
139 else: 139 else:
140 oldfile = None 140 oldfile = None
141 141