Patchwork [bitbake-devel,2/2] Hob: reset user recipe selection and package selection after settings are changed

login
register
mail settings
Submitter Shane Wang
Date April 14, 2012, 6:58 p.m.
Message ID <2ca4f63bf948765410a50e8ec1cffc79cec89664.1334429180.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/25847/
State New
Headers show

Comments

Shane Wang - April 14, 2012, 6:58 p.m.
Reset user recipe list and package list after the user changes the settings and
triggers recipe reparsing.

This is to continue to fix the bug [Yocto #2255]

[Yocto #2255]

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py                |   12 ++++++++----
 bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    4 +---
 2 files changed, 9 insertions(+), 7 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 5dd2b13..48053b3 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -60,9 +60,7 @@  class Configuration:
         # bblayers.conf
         self.layers = []
         # image/recipes/packages
-        self.selected_image = None
-        self.selected_recipes = []
-        self.selected_packages = []
+        self.clear_selection()
 
         self.user_selected_packages = []
 
@@ -73,6 +71,11 @@  class Configuration:
         self.git_proxy_host = self.git_proxy_port = ""
         self.cvs_proxy_host = self.cvs_proxy_port = ""
 
+    def clear_selection(self):
+        self.selected_image = None
+        self.selected_recipes = []
+        self.selected_packages = []
+
     def update(self, params):
         # settings
         self.curr_distro = params["distro"]
@@ -988,10 +991,11 @@  class Builder(gtk.Window):
         return response == gtk.RESPONSE_YES, settings_changed
 
     def reparse_post_adv_settings(self):
-        # DO reparse recipes
         if not self.configuration.curr_mach:
             self.update_config_async()
         else:
+            self.configuration.clear_selection()
+            # DO reparse recipes
             self.populate_recipe_package_info_async()
 
     def deploy_image(self, image_name):
diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 64c512d5..0463ee8 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -264,9 +264,7 @@  class ImageConfigurationPage (HobPage):
 
         self.builder.configuration.curr_mach = combo_item
         if self.machine_combo_changed_by_manual:
-            self.builder.configuration.selected_image = None
-            self.builder.configuration.selected_recipes = []
-            self.builder.configuration.selected_packages = []
+            self.builder.configuration.clear_selection()
         # reset machine_combo_changed_by_manual
         self.machine_combo_changed_by_manual = True