summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/parse_py/BBHandler.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-02-23 17:38:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-23 22:52:15 +0000
commit99d326a818a49faf457c707ceeec6163bf8c8e16 (patch)
tree6e03dca72ed109a691356bd2d9feb172423da6ab /bitbake/lib/bb/parse/parse_py/BBHandler.py
parentebc0d4252a19e6ab38052473e54138d29b172dfc (diff)
downloadpoky-99d326a818a49faf457c707ceeec6163bf8c8e16.tar.gz
bitbake: add file and line number to ParseError
Ensure that a file and line number are reported for ParseError where possible. This helps particularly in the case of inherit and require which previously did not report either of these upon failure. (Bitbake rev: f588ba69622a2df35417ced184e56c79ac1b40d5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> 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.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 2d6e331a1d..125f458de7 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -68,10 +68,8 @@ def supports(fn, d):
68 """Return True if fn has a supported extension""" 68 """Return True if fn has a supported extension"""
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, d): 71def inherit(files, fn, lineno, d):
72 __inherit_cache = data.getVar('__inherit_cache', d) or [] 72 __inherit_cache = data.getVar('__inherit_cache', d) or []
73 fn = ""
74 lineno = 0
75 for file in files: 73 for file in files:
76 file = data.expand(file, d) 74 file = data.expand(file, d)
77 if not os.path.isabs(file) and not file.endswith(".bbclass"): 75 if not os.path.isabs(file) and not file.endswith(".bbclass"):
@@ -81,7 +79,7 @@ def inherit(files, d):
81 logger.log(logging.DEBUG -1, "BB %s:%d: inheriting %s", fn, lineno, file) 79 logger.log(logging.DEBUG -1, "BB %s:%d: inheriting %s", fn, lineno, file)
82 __inherit_cache.append( file ) 80 __inherit_cache.append( file )
83 data.setVar('__inherit_cache', __inherit_cache, d) 81 data.setVar('__inherit_cache', __inherit_cache, d)
84 include(fn, file, d, "inherit") 82 include(fn, file, lineno, d, "inherit")
85 __inherit_cache = data.getVar('__inherit_cache', d) or [] 83 __inherit_cache = data.getVar('__inherit_cache', d) or []
86 84
87def get_statements(filename, absolute_filename, base_name): 85def get_statements(filename, absolute_filename, base_name):