diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-05-28 18:10:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-14 11:27:11 +0100 |
commit | 5b3a0eac61d39ae37c44eb644f2debf7d99596af (patch) | |
tree | 583fadbbbdc57d8cb02994732e3f75a0e47f7495 /bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |
parent | 4c4924ad1b7a169ea35446ec9fe6fb33eb452014 (diff) | |
download | poky-5b3a0eac61d39ae37c44eb644f2debf7d99596af.tar.gz |
hob: handle sanity check failures as a separate event
In order to show a friendlier error message that does not bury the
actual sanity error in our typical preamble about disabling sanity
checks, use a separate event to indicate that sanity checks failed.
This change is intended to work together with the related change to
sanity.bbclass in OE-Core.
Fixes [YOCTO #2336].
(Bitbake rev: 24b631acdaa143a4de39c6e1328849660c66f219)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 424bcfa525..74138cb031 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
@@ -42,6 +42,9 @@ class HobHandler(gobject.GObject): | |||
42 | "command-failed" : (gobject.SIGNAL_RUN_LAST, | 42 | "command-failed" : (gobject.SIGNAL_RUN_LAST, |
43 | gobject.TYPE_NONE, | 43 | gobject.TYPE_NONE, |
44 | (gobject.TYPE_STRING,)), | 44 | (gobject.TYPE_STRING,)), |
45 | "sanity-failed" : (gobject.SIGNAL_RUN_LAST, | ||
46 | gobject.TYPE_NONE, | ||
47 | (gobject.TYPE_STRING,)), | ||
45 | "generating-data" : (gobject.SIGNAL_RUN_LAST, | 48 | "generating-data" : (gobject.SIGNAL_RUN_LAST, |
46 | gobject.TYPE_NONE, | 49 | gobject.TYPE_NONE, |
47 | ()), | 50 | ()), |
@@ -170,6 +173,9 @@ class HobHandler(gobject.GObject): | |||
170 | elif isinstance(event, bb.event.SanityCheckPassed): | 173 | elif isinstance(event, bb.event.SanityCheckPassed): |
171 | self.run_next_command() | 174 | self.run_next_command() |
172 | 175 | ||
176 | elif isinstance(event, bb.event.SanityCheckFailed): | ||
177 | self.emit("sanity-failed", event._msg) | ||
178 | |||
173 | elif isinstance(event, logging.LogRecord): | 179 | elif isinstance(event, logging.LogRecord): |
174 | if event.levelno >= logging.ERROR: | 180 | if event.levelno >= logging.ERROR: |
175 | self.error_msg += event.msg + '\n' | 181 | self.error_msg += event.msg + '\n' |