summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-15 13:38:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-17 17:51:03 +0000
commit2e20effe31a904c1aa0172291124ebdcf0889598 (patch)
tree37614aeb78f4a8230834ba542b5485b6fab4ccc8
parent0d3327b592d8c15155bc0b887f4eba6a0f29d8b8 (diff)
downloadpoky-2e20effe31a904c1aa0172291124ebdcf0889598.tar.gz
bitbake: 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. (Bitbake rev: fdf6ebc8b603fcfd3ed7c64baf486a4adabd25be) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/cooker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 08e45e79d0..d1d4e32595 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2167,6 +2167,8 @@ class CookerParser(object):
2167 self.total) 2167 self.total)
2168 2168
2169 bb.event.fire(event, self.cfgdata) 2169 bb.event.fire(event, self.cfgdata)
2170 else:
2171 bb.error("Parsing halted due to errors")
2170 2172
2171 for process in self.processes: 2173 for process in self.processes:
2172 self.parser_quit.put(None) 2174 self.parser_quit.put(None)
@@ -2257,7 +2259,7 @@ class CookerParser(object):
2257 return False 2259 return False
2258 except bb.BBHandledException as exc: 2260 except bb.BBHandledException as exc:
2259 self.error += 1 2261 self.error += 1
2260 logger.error('Failed to parse recipe: %s' % exc.recipe) 2262 logger.debug('Failed to parse recipe: %s' % exc.recipe)
2261 self.shutdown(clean=False, force=True) 2263 self.shutdown(clean=False, force=True)
2262 return False 2264 return False
2263 except ParsingFailure as exc: 2265 except ParsingFailure as exc: