1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-27 07:27:12 +00:00

codeparser: accept a name for better messages

- If a name is passed to the parser, prepend the messages with "while
  parsing <name>:". This gives a bit more context.
- Tweak the warning messages slightly (they had to be altered anyway to
  inject the variable being parsed).

Before:
  DEBUG: Warning: in call to 'bb.data.getVar': argument ''%s' % var' is \
         not a literal

After:
  DEBUG: while parsing emit_pkgdata, in call of bb.data.getVar, argument \
         ''%s' % var' is not a string literal

(Bitbake rev: 1060193ae4d54e667735dbff5d1d2be49a3f95c9)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Christopher Larson
2011-10-28 21:32:26 -04:00
committed by Richard Purdie
parent 28ca6cc34b
commit 2b26745c70
3 changed files with 13 additions and 11 deletions
+2 -2
View File
@@ -258,7 +258,7 @@ def emit_func(func, o=sys.__stdout__, d = init()):
emit_var(key, o, d, False) and o.write('\n')
emit_var(func, o, d, False) and o.write('\n')
newdeps = bb.codeparser.ShellParser().parse_shell(d.getVar(func, True))
newdeps = bb.codeparser.ShellParser(func).parse_shell(d.getVar(func, True))
seen = set()
while newdeps:
deps = newdeps
@@ -267,7 +267,7 @@ def emit_func(func, o=sys.__stdout__, d = init()):
for dep in deps:
if bb.data.getVarFlag(dep, "func", d):
emit_var(dep, o, d, False) and o.write('\n')
newdeps |= bb.codeparser.ShellParser().parse_shell(d.getVar(dep, True))
newdeps |= bb.codeparser.ShellParser(dep).parse_shell(d.getVar(dep, True))
newdeps -= seen
def update_data(d):