From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] cooker.py: Ensure we track parser errors and only show bbappend issues on complete parse
Date: Mon, 23 Jul 2012 17:41:01 +0100 [thread overview]
Message-ID: <1343061661.21788.106.camel@ted> (raw)
Currently if any parsing failure occurs, there can be a long list of
bbappends that are "dangling" based on the fact that recipes were not
parsed. This change firstly ensures the error counter is incremented
and secondly that the bbappends list is only shown on a completed
parse list.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 361bc88..5d01af3 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1205,8 +1205,9 @@ class BBCooker:
if not self.parser.parse_next():
collectlog.debug(1, "parsing complete")
- self.show_appends_with_no_recipes()
- self.buildDepgraph()
+ if not self.parser.error:
+ self.show_appends_with_no_recipes()
+ self.buildDepgraph()
self.state = state.running
return None
@@ -1601,6 +1602,7 @@ class CookerParser(object):
self.skipped, self.masked,
self.virtuals, self.error,
self.total)
+
bb.event.fire(event, self.cfgdata)
self.feeder_quit.put(None)
for process in self.processes:
@@ -1658,20 +1660,25 @@ class CookerParser(object):
self.shutdown()
return False
except ParsingFailure as exc:
+ self.error += 1
logger.error('Unable to parse %s: %s' %
(exc.recipe, bb.exceptions.to_string(exc.realexception)))
self.shutdown(clean=False)
except bb.parse.ParseError as exc:
+ self.error += 1
logger.error(str(exc))
self.shutdown(clean=False)
except bb.data_smart.ExpansionError as exc:
+ self.error += 1
_, value, _ = sys.exc_info()
logger.error('ExpansionError during parsing %s: %s', value.recipe, str(exc))
self.shutdown(clean=False)
except SyntaxError as exc:
+ self.error += 1
logger.error('Unable to parse %s', exc.recipe)
self.shutdown(clean=False)
except Exception as exc:
+ self.error += 1
etype, value, tb = sys.exc_info()
logger.error('Unable to parse %s', value.recipe,
exc_info=(etype, value, exc.traceback))
reply other threads:[~2012-07-23 16:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343061661.21788.106.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.