Patchwork [bitbake-devel,07/21] Hob: clean up and unify the steps for CONFIG_UPDATE to call update_config_async()

login
register
mail settings
Submitter Shane Wang
Date April 9, 2012, 2:13 p.m.
Message ID <0c8edf4eec2e8fc6e8c81b56ccbfe521a9b3294f.1333980505.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/25401/
State New
Headers show

Comments

Shane Wang - April 9, 2012, 2:13 p.m.
For the steps in CONFIG_UPDATE, the patch consolidates them into
update_config_async() to call.
consequently remove CONFIG_UPDATE since MACHINE_SELECTION covers it.

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

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index ef6f182..6b8e9f3 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -212,7 +212,6 @@  class Parameters:
 class Builder(gtk.Window):
 
     (MACHINE_SELECTION,
-     CONFIG_UPDATED,
      RCPPKGINFO_POPULATING,
      RCPPKGINFO_POPULATED,
      BASEIMG_SELECTED,
@@ -225,7 +224,7 @@  class Builder(gtk.Window):
      IMAGE_GENERATED,
      MY_IMAGE_OPENED,
      BACK,
-     END_NOOP) = range(15)
+     END_NOOP) = range(14)
 
     (IMAGE_CONFIGURATION,
      RECIPE_DETAILS,
@@ -236,7 +235,6 @@  class Builder(gtk.Window):
 
     __step2page__ = {
         MACHINE_SELECTION     : IMAGE_CONFIGURATION,
-        CONFIG_UPDATED        : IMAGE_CONFIGURATION,
         RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
         RCPPKGINFO_POPULATED  : IMAGE_CONFIGURATION,
         BASEIMG_SELECTED      : IMAGE_CONFIGURATION,
@@ -336,6 +334,11 @@  class Builder(gtk.Window):
         self.handler.set_extra_inherit("image_types")
         self.handler.parse_config()
 
+    def update_config_async(self):
+        self.switch_page(self.MACHINE_SELECTION)
+        self.set_user_config()
+        self.handler.parse_generate_configuration()
+
     def load_template(self, path):
         self.template = TemplateMgr()
         self.template.load(path)
@@ -345,7 +348,7 @@  class Builder(gtk.Window):
             if not os.path.exists(layer+'/conf/layer.conf'):
                 return False
 
-        self.switch_page(self.CONFIG_UPDATED)
+        self.update_config_async()
 
         self.template.destroy()
         self.template = None
@@ -373,12 +376,6 @@  class Builder(gtk.Window):
         if next_step == self.MACHINE_SELECTION: # init step
             self.image_configuration_page.show_machine()
 
-        elif next_step == self.CONFIG_UPDATED:
-            # after layers is changd by users
-            self.image_configuration_page.show_machine()
-            self.set_user_config()
-            self.handler.parse_generate_configuration()
-
         elif next_step == self.RCPPKGINFO_POPULATING:
             # MACHINE CHANGED action or SETTINGS CHANGED
             # show the progress bar
@@ -795,7 +792,7 @@  class Builder(gtk.Window):
             self.configuration.layers = dialog.layers
             # DO refresh layers
             if dialog.layers_changed:
-                self.switch_page(self.CONFIG_UPDATED)
+                self.update_config_async()
         dialog.destroy()
 
     def show_load_template_dialog(self):
@@ -886,7 +883,7 @@  class Builder(gtk.Window):
     def reparse_post_adv_settings(self):
         # DO reparse recipes
         if not self.configuration.curr_mach:
-            self.switch_page(self.CONFIG_UPDATED)
+            self.update_config_async()
         else:
             self.switch_page(self.RCPPKGINFO_POPULATING)