summaryrefslogtreecommitdiffstats
path: root/bitbake
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:35 +0000
commit2b6574e7c4341c7e999c113e4ee7b9201b56910f (patch)
tree9b0218484382a4645b4ab6cf6b7e0aad1324d123 /bitbake
parent981ecb069a283cb7ac67a379d0bb8dd578672694 (diff)
downloadpoky-2b6574e7c4341c7e999c113e4ee7b9201b56910f.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: b562966435ccd2335cfdccf89a9d7d18dd76a749) 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>
Diffstat (limited to 'bitbake')
-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 3688aa0886..288d73fd92 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: