| Summary: | cooker: event queue overflowed | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Patrick Ohly <patrick.ohly> |
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> |
| Status: | RESOLVED FIXED | QA Contact: | David Lopez Barriba <davidx.lopez.barriba> |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | jose.perez.carranza, poky.bs.watcher, poky.watcher |
| Version: | unspecified | ||
| Target Milestone: | 2.3 M1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Patrick Ohly
2016-11-16 08:19:54 UTC
Handling a shell command like
echo foo | sed -u 's/^/bar: /' & wait $!
required a slightly more complex workaround. In that case, the offending token is a list of three tuples.
Here's the updated workaround which handles that. Changing indention makes it fairly large. The basic idea is that if a token is a list, process_token_list will be called recursively for the members of that list.
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index 41484ec..8673b77 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -389,25 +389,24 @@ class ShellParser():
"case_clause": case_clause,
}
- for token in tokens:
- try:
+ def process_token_list(tokens):
+ for token in tokens:
+ if isinstance(token, list):
+ process_token_list(token)
+ continue
name, value = token
- except ValueError:
- if isinstance(token, list) and len(token) == 1:
- bb.warn('Unexpected token (need list or tuple with two entries): %s' % token)
- name, value = token[0]
- else:
- bb.fatal('Cannot split %s into name and value (need list or tuple with two entries)' % token)
- try:
- more_tokens, words = token_handlers[name](value)
- except KeyError:
- raise NotImplementedError("Unsupported token type " + name)
+ try:
+ more_tokens, words = token_handlers[name](value)
+ except KeyError:
+ raise NotImplementedError("Unsupported token type " + name)
+
+ if more_tokens:
+ self.process_tokens(more_tokens)
- if more_tokens:
- self.process_tokens(more_tokens)
+ if words:
+ self.process_words(words)
- if words:
- self.process_words(words)
+ process_token_list(tokens)
def process_words(self, words):
"""Process a set of 'words' in pyshyacc parlance, which includes
Oops, wrong bug. Please ignore comment #1. |