[bitbake-devel] [PATCH 10/32] Hob: add ignore_all_errors to avoid showing error dialog multiple times

Shane Wang shane.wang at intel.com
Wed Feb 29 14:15:07 UTC 2012


when parsing recipes, if there are some errors, the error dialog will be shown again and again for each error, add "Ignore All" to allow users to ignore those errors.

Signed-off-by: Shane Wang <shane.wang at intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 819b79f..fc231ef 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -178,6 +178,8 @@ class Builder(gtk.Window):
 
         self.template = None
 
+        self.ignore_all_errors = False
+
         # settings
         params = self.handler.get_parameters()
         self.configuration = Configuration(params)
@@ -315,6 +317,8 @@ class Builder(gtk.Window):
 
         elif next_step == self.RCPPKGINFO_POPULATING:
             # MACHINE CHANGED action or SETTINGS CHANGED
+            # reset the "ignore all errors" var
+            self.ignore_all_errors = False
             # show the progress bar
             self.image_configuration_page.show_info_populating()
             self.generate_recipes()
@@ -440,12 +444,16 @@ class Builder(gtk.Window):
                 self.switch_page(self.IMAGE_GENERATED)
 
     def handler_command_failed_cb(self, handler, msg):
-        lbl = "<b>Error</b>\n"
-        lbl = lbl + "%s\n\n" % msg
-        dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
-        dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
-        response = dialog.run()
-        dialog.destroy()
+        if self.ignore_all_errors == False:
+            lbl = "<b>Error</b>\n"
+            lbl = lbl + "%s\n\n" % msg
+            dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
+            dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
+            dialog.add_button("Ignore All", gtk.RESPONSE_REJECT)
+            response = dialog.run()
+            if response == gtk.RESPONSE_REJECT:
+                self.ignore_all_errors = True
+            dialog.destroy()
         self.handler.clear_busy()
         self.configuration.curr_mach = None
         self.image_configuration_page.switch_machine_combo()
-- 
1.7.6





More information about the bitbake-devel mailing list