aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-14 10:13:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-14 13:33:12 +0000
commitb562966435ccd2335cfdccf89a9d7d18dd76a749 (patch)
tree0d582ed50c648f5a2265472fc0fa06dc644619bf
parent18c8bf506355a432a767f09879ea32119c593513 (diff)
downloadbitbake-b562966435ccd2335cfdccf89a9d7d18dd76a749.tar.gz
cooker: Improve parsing failure from handled exception usability
When a recipe raises a BBHandledException, it means the error was already shown to the user. Adding an additional one here isn't helpful. What is helpful is to mention that parsing was halted. Tweak the code to do this with improves the messages the user sees and helps understand what happened. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fdf6ebc8b603fcfd3ed7c64baf486a4adabd25be) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cooker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 3688aa088..288d73fd9 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -2167,6 +2167,8 @@ class CookerParser(object):
self.total)
bb.event.fire(event, self.cfgdata)
+ else:
+ bb.error("Parsing halted due to errors")
for process in self.processes:
self.parser_quit.put(None)
@@ -2257,7 +2259,7 @@ class CookerParser(object):
return False
except bb.BBHandledException as exc:
self.error += 1
- logger.error('Failed to parse recipe: %s' % exc.recipe)
+ logger.debug('Failed to parse recipe: %s' % exc.recipe)
self.shutdown(clean=False, force=True)
return False
except ParsingFailure as exc: