Patchwork [bitbake-devel] hob/packageselectionpage: restore selected packages

login
register
mail settings
Submitter Cristiana Voicu
Date Sept. 10, 2012, 12:49 p.m.
Message ID <1347281397-15677-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/36199/
State New
Headers show

Comments

Cristiana Voicu - Sept. 10, 2012, 12:49 p.m.
After "Cancel" action, selected packages are restored to default.

[YOCTO #2984]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py              |    2 +-
 bitbake/lib/bb/ui/crumbs/packageselectionpage.py |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)
Richard Purdie - Sept. 10, 2012, 8:55 p.m.
On Mon, 2012-09-10 at 15:49 +0300, Cristiana Voicu wrote:
> After "Cancel" action, selected packages are restored to default.
> 
> [YOCTO #2984]
> Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
> ---
>  bitbake/lib/bb/ui/crumbs/builder.py              |    2 +-
>  bitbake/lib/bb/ui/crumbs/packageselectionpage.py |    5 ++---
>  2 files changed, 3 insertions(+), 4 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 833577f..18261c2 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -660,6 +660,7 @@  class Builder(gtk.Window):
                 self.recipe_details_page.set_recipe_curr_tab(self.recipe_details_page.INCLUDED)
 
         elif next_step == self.PACKAGE_SELECTION:
+            self.configuration.initial_selected_packages = self.configuration.selected_packages
             if self.recipe_model.get_selected_image() == self.recipe_model.__custom_image__:
                 self.package_details_page.set_packages_curr_tab(self.package_details_page.ALL)
             else:
@@ -672,7 +673,6 @@  class Builder(gtk.Window):
             self.build_details_page.show_page(next_step)
 
         elif next_step == self.PACKAGE_GENERATED:
-            self.configuration.initial_selected_packages = self.configuration.selected_packages
             if self.recipe_model.get_selected_image() == self.recipe_model.__custom_image__:
                 self.package_details_page.set_packages_curr_tab(self.package_details_page.ALL)
             else:
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
index c73697b..e3d35ef 100755
--- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
@@ -187,12 +187,11 @@  class PackageSelectionPage (HobPage):
         self.builder.build_image()
 
     def back_button_clicked_cb(self, button):
-        self.builder.restore_initial_selected_packages()
-        self.refresh_selection()
-
         if self.builder.current_step ==  self.builder.PACKAGE_GENERATED:
             self.builder.show_recipes()
         elif self.builder.previous_step ==  self.builder.IMAGE_GENERATED:
+            self.builder.restore_initial_selected_packages()
+            self.refresh_selection()
             self.builder.show_image_details()
 
     def _expand_all(self):