[bitbake-devel] [PATCH 3/9] lib/bb/ui/crumbs/recipeselectionpage: add 'Build image' button per design

Xu, Dongxiao dongxiao.xu at intel.com
Sat Mar 24 00:32:19 UTC 2012


On Fri, 2012-03-23 at 17:23 -0700, Joshua Lock wrote:
> The design calls for the 'Build packages' button to be a secondary action
> and a 'Build image' primary action to exist on the recipe selection page.

Sorry, I think this design doesn't make sense.

Thinking of this scenario, if a user clicks "Create your own image" in
base image drop down list, and then clicks "View Recipes" to select some
recipes, if we allow user to directly click "Build image" here, it is
wrong since nothing has been set to PACKAGE_INSTALL variable and the
image build will fail.

Also it will confuse user that, they would think what they selected in
the recipe page will be packed into the final image, however it isn't.
Therefore I suggest removing the "build image" button in recipe
selection page.

Thanks,
Dongxiao


> 
> Fixes [YOCTO #2165]
> 
> Signed-off-by: Joshua Lock <josh at linux.intel.com>
> ---
>  lib/bb/ui/crumbs/recipeselectionpage.py |   18 +++++++++++++-----
>  1 files changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
> index 881b2ec..e77e79b 100755
> --- a/lib/bb/ui/crumbs/recipeselectionpage.py
> +++ b/lib/bb/ui/crumbs/recipeselectionpage.py
> @@ -151,11 +151,16 @@ class RecipeSelectionPage (HobPage):
>          button_box = gtk.HBox(False, 6)
>          self.box_group_area.pack_end(button_box, expand=False, fill=False)
>  
> -        self.build_packages_button = HobButton('Build packages')
> -        self.build_packages_button.set_size_request(205, 49)
> -        self.build_packages_button.set_tooltip_text("Build packages for customization")
> -        self.build_packages_button.set_flags(gtk.CAN_DEFAULT)
> -        self.build_packages_button.grab_default()
> +        self.build_image_button = HobButton('Build image')
> +        self.build_image_button.connect("clicked", self.build_image_clicked_cb)
> +        button_box.pack_end(self.build_image_button, expand=False, fill=False)
> +        self.build_image_button.set_size_request(205, 49)
> +        self.build_image_button.set_tooltip_text("Build packages for customization")
> +        self.build_image_button.set_flags(gtk.CAN_DEFAULT)
> +        self.build_image_button.grab_default()
> +        label = gtk.Label("or")
> +        button_box.pack_end(label, expand=False, fill=False)
> +        self.build_packages_button = HobAltButton('Build packages')
>          self.build_packages_button.connect("clicked", self.build_packages_clicked_cb)
>          button_box.pack_end(self.build_packages_button, expand=False, fill=False)
>  
> @@ -174,6 +179,9 @@ class RecipeSelectionPage (HobPage):
>      def back_button_clicked_cb(self, button):
>          self.builder.show_configuration()
>  
> +    def build_image_clicked_cb(self, button):
> +        self.builder.build_image()
> +
>      def refresh_selection(self):
>          self.builder.configuration.selected_image = self.recipe_model.get_selected_image()
>          _, self.builder.configuration.selected_recipes = self.recipe_model.get_selected_recipes()






More information about the bitbake-devel mailing list