summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/event.py8
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py7
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py6
3 files changed, 20 insertions, 1 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index f3fb5213ba..1116c0a7bf 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -527,3 +527,11 @@ class SanityCheckPassed(Event):
527 """ 527 """
528 Event to indicate sanity check is passed 528 Event to indicate sanity check is passed
529 """ 529 """
530
531class SanityCheckFailed(Event):
532 """
533 Event to indicate sanity check has failed
534 """
535 def __init__(self, msg):
536 Event.__init__(self)
537 self._msg = msg
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 3f6878246c..df85326652 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -354,6 +354,7 @@ class Builder(gtk.Window):
354 self.handler.connect("data-generated", self.handler_data_generated_cb) 354 self.handler.connect("data-generated", self.handler_data_generated_cb)
355 self.handler.connect("command-succeeded", self.handler_command_succeeded_cb) 355 self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
356 self.handler.connect("command-failed", self.handler_command_failed_cb) 356 self.handler.connect("command-failed", self.handler_command_failed_cb)
357 self.handler.connect("sanity-failed", self.handler_sanity_failed_cb)
357 self.handler.connect("recipe-populated", self.handler_recipe_populated_cb) 358 self.handler.connect("recipe-populated", self.handler_recipe_populated_cb)
358 self.handler.connect("package-populated", self.handler_package_populated_cb) 359 self.handler.connect("package-populated", self.handler_package_populated_cb)
359 360
@@ -652,10 +653,14 @@ class Builder(gtk.Window):
652 653
653 def handler_command_failed_cb(self, handler, msg): 654 def handler_command_failed_cb(self, handler, msg):
654 if msg: 655 if msg:
655 msg = msg.replace("your local.conf", "Settings")
656 self.show_error_dialog(msg) 656 self.show_error_dialog(msg)
657 self.reset() 657 self.reset()
658 658
659 def handler_sanity_failed_cb(self, handler, msg):
660 msg = msg.replace("your local.conf", "Settings")
661 self.show_error_dialog(msg)
662 self.reset()
663
659 def window_sensitive(self, sensitive): 664 def window_sensitive(self, sensitive):
660 self.image_configuration_page.machine_combo.set_sensitive(sensitive) 665 self.image_configuration_page.machine_combo.set_sensitive(sensitive)
661 self.image_configuration_page.image_combo.set_sensitive(sensitive) 666 self.image_configuration_page.image_combo.set_sensitive(sensitive)
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'