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

Joshua Lock josh at linux.intel.com
Wed Feb 29 21:29:17 UTC 2012



On 29/02/12 06:15, Shane Wang wrote:
> 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.

I'm not so sure about this. I don't think ignoring all parse errors is 
the right thing, collecting them up into one dialogue seems like a 
better first step.

What if I add some layers which introduce different parsing errors after 
I've clicked 'Ignore All' once?

Cheers,
Joshua

>
> 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()

-- 
Joshua Lock
         Yocto Project "Johannes factotum"
         Intel Open Source Technology Centre




More information about the bitbake-devel mailing list