summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-04 17:31:58 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-06 15:27:34 +0000
commita16b54343653f53f7f84b3f1c0f952e83e2f8771 (patch)
treeee4d7a3b5b468b7af51531490b412a4e70eb0668
parent958f0ff56b37a08c905f8f8fdc17353dcad8ef60 (diff)
downloadpoky-a16b54343653f53f7f84b3f1c0f952e83e2f8771.tar.gz
poky-a16b54343653f53f7f84b3f1c0f952e83e2f8771.tar.bz2
poky-a16b54343653f53f7f84b3f1c0f952e83e2f8771.zip
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.py4
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):
deps |= parser.references
deps = deps | (keys & parser.execs)
return deps, value
- varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "postfuncs", "prefuncs"]) or {}
+ varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "postfuncs", "prefuncs", "lineno", "filename"]) or {}
vardeps = varflags.get("vardeps")
value = d.getVar(key, False)
@@ -365,7 +365,7 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
parser = bb.codeparser.PythonParser(key, logger)
if parsedvar.value and "\t" in parsedvar.value:
logger.warn("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True)))
- parser.parse_python(parsedvar.value)
+ parser.parse_python(parsedvar.value, filename=varflags.get("filename"), lineno=varflags.get("lineno"))
deps = deps | parser.references
value = handle_contains(value, parser.contains, d)
else: