diff options
| -rw-r--r-- | bitbake/lib/bb/codeparser.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py index 577b4271cf..2094f1337c 100644 --- a/bitbake/lib/bb/codeparser.py +++ b/bitbake/lib/bb/codeparser.py | |||
| @@ -221,6 +221,17 @@ class PythonParser(): | |||
| 221 | self.references.add(node.args[0].s) | 221 | self.references.add(node.args[0].s) |
| 222 | else: | 222 | else: |
| 223 | self.warn(node.func, node.args[0]) | 223 | self.warn(node.func, node.args[0]) |
| 224 | elif name and name.endswith(".expand"): | ||
| 225 | if isinstance(node.args[0], ast.Str): | ||
| 226 | value = node.args[0].s | ||
| 227 | d = bb.data.init() | ||
| 228 | parser = d.expandWithRefs(value, self.name) | ||
| 229 | self.references |= parser.references | ||
| 230 | self.execs |= parser.execs | ||
| 231 | for varname in parser.contains: | ||
| 232 | if varname not in self.contains: | ||
| 233 | self.contains[varname] = set() | ||
| 234 | self.contains[varname] |= parser.contains[varname] | ||
| 224 | elif name in self.execfuncs: | 235 | elif name in self.execfuncs: |
| 225 | if isinstance(node.args[0], ast.Str): | 236 | if isinstance(node.args[0], ast.Str): |
| 226 | self.var_execs.add(node.args[0].s) | 237 | self.var_execs.add(node.args[0].s) |
| @@ -243,6 +254,7 @@ class PythonParser(): | |||
| 243 | break | 254 | break |
| 244 | 255 | ||
| 245 | def __init__(self, name, log): | 256 | def __init__(self, name, log): |
| 257 | self.name = name | ||
| 246 | self.var_execs = set() | 258 | self.var_execs = set() |
| 247 | self.contains = {} | 259 | self.contains = {} |
| 248 | self.execs = set() | 260 | self.execs = set() |
