summaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2006-11-09 23:12:09 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2006-11-09 23:12:09 +0000
commite4f50150c041f490ae80dedb96232e157f1978eb (patch)
tree3fd0f5a9312678b34c5c5b0b8cac4ebfd1b55dea /lib/bb
parent1b1175753e8f3ffce3395250b7c6be5e80b65bff (diff)
downloadbitbake-contrib-e4f50150c041f490ae80dedb96232e157f1978eb.tar.gz
Improve errors messages for required vs. inherited files
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py2
-rw-r--r--lib/bb/parse/parse_py/ConfHandler.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 768f9ebcc..34f4d2599 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -69,7 +69,7 @@ def inherit(files, d):
if not file in __inherit_cache.split():
bb.msg.debug(2, bb.msg.domain.Parsing, "BB %s:%d: inheriting %s" % (fn, lineno, file))
__inherit_cache += " %s" % file
- include(fn, file, d, True)
+ include(fn, file, d, "inherit")
data.setVar('__inherit_cache', __inherit_cache, d)
diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py
index e651d9233..4bc2bbc2b 100644
--- a/lib/bb/parse/parse_py/ConfHandler.py
+++ b/lib/bb/parse/parse_py/ConfHandler.py
@@ -83,7 +83,7 @@ def obtain(fn, data):
return localfn
-def include(oldfn, fn, data, error_out = False):
+def include(oldfn, fn, data, error_out):
"""
error_out If True a ParseError will be reaised if the to be included
@@ -100,7 +100,7 @@ def include(oldfn, fn, data, error_out = False):
ret = handle(fn, data, True)
except IOError:
if error_out:
- raise ParseError("Could not include required file %(fn)s" % vars() )
+ raise ParseError("Could not %(error_out)s file %(fn)s" % vars() )
bb.msg.debug(2, bb.msg.domain.Parsing, "CONF file '%s' not found" % fn)
def handle(fn, data, include = 0):
@@ -194,13 +194,13 @@ def feeder(lineno, s, fn, data):
if m:
s = bb.data.expand(m.group(1), data)
bb.msg.debug(3, bb.msg.domain.Parsing, "CONF %s:%d: including %s" % (fn, lineno, s))
- include(fn, s, data)
+ include(fn, s, data, False)
return
m = __require_regexp__.match(s)
if m:
s = bb.data.expand(m.group(1), data)
- include(fn, s, data, True)
+ include(fn, s, data, "include required")
return
raise ParseError("%s:%d: unparsed line: '%s'" % (fn, lineno, s));