diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-04 17:31:58 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-06 15:27:34 +0000 |
commit | a16b54343653f53f7f84b3f1c0f952e83e2f8771 (patch) | |
tree | ee4d7a3b5b468b7af51531490b412a4e70eb0668 | |
parent | 958f0ff56b37a08c905f8f8fdc17353dcad8ef60 (diff) | |
download | poky-a16b54343653f53f7f84b3f1c0f952e83e2f8771.tar.gz |
bitbake: data: Pass lineno/filename data from build_dependencies
If parse_python() fails, the output is confusing. Passing in the extra
file/line data isn't expensive and improves readability significantly.
(Bitbake rev: a4bb753488d322e0e31c31d6377ba780f2f824c4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/data.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index f6415a4674..dc8d02e01d 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py | |||
@@ -338,7 +338,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d): | |||
338 | deps |= parser.references | 338 | deps |= parser.references |
339 | deps = deps | (keys & parser.execs) | 339 | deps = deps | (keys & parser.execs) |
340 | return deps, value | 340 | return deps, value |
341 | varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "postfuncs", "prefuncs"]) or {} | 341 | varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "postfuncs", "prefuncs", "lineno", "filename"]) or {} |
342 | vardeps = varflags.get("vardeps") | 342 | vardeps = varflags.get("vardeps") |
343 | value = d.getVar(key, False) | 343 | value = d.getVar(key, False) |
344 | 344 | ||
@@ -365,7 +365,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d): | |||
365 | parser = bb.codeparser.PythonParser(key, logger) | 365 | parser = bb.codeparser.PythonParser(key, logger) |
366 | if parsedvar.value and "\t" in parsedvar.value: | 366 | if parsedvar.value and "\t" in parsedvar.value: |
367 | logger.warn("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True))) | 367 | logger.warn("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True))) |
368 | parser.parse_python(parsedvar.value) | 368 | parser.parse_python(parsedvar.value, filename=varflags.get("filename"), lineno=varflags.get("lineno")) |
369 | deps = deps | parser.references | 369 | deps = deps | parser.references |
370 | value = handle_contains(value, parser.contains, d) | 370 | value = handle_contains(value, parser.contains, d) |
371 | else: | 371 | else: |