Patchwork [bitbake-devel,21/21] Hob:Fixed some incorrect values of Build configuration tab

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

Comments

Shane Wang - April 9, 2012, 2:13 p.m.
From: Liming An <limingx.l.an@intel.com>

Because some variables not be updated when building started, so add them
to the updating function of configuration class, and add reset function of
configurate treeview of building detail page

[YOCTO #2244]

Signed-off-by: Liming An <limingx.l.an@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |   20 ++++++++++++--------
 bitbake/lib/bb/ui/crumbs/builder.py          |   14 +++++++-------
 2 files changed, 19 insertions(+), 15 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
index cd4413b..23aaacd 100755
--- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
@@ -81,16 +81,16 @@  class BuildConfigurationTreeView(gtk.TreeView):
         # renew the tree model after get the configuration messages
         self.set_model(listmodel)
 
-    def show(self, src_config_info, src_params):
+    def show(self, src_config_info):
         vars = []
-        vars.append(self.set_vars("BB version:", src_params.bb_version))
-        vars.append(self.set_vars("Target arch:", src_params.target_arch))
-        vars.append(self.set_vars("Target OS:", src_params.target_os))
+        vars.append(self.set_vars("BB version:", src_config_info.bb_version))
+        vars.append(self.set_vars("Target arch:", src_config_info.target_arch))
+        vars.append(self.set_vars("Target OS:", src_config_info.target_os))
         vars.append(self.set_vars("Machine:", src_config_info.curr_mach))
         vars.append(self.set_vars("Distro:", src_config_info.curr_distro))
-        vars.append(self.set_vars("Distro version:", src_params.distro_version))
+        vars.append(self.set_vars("Distro version:", src_config_info.distro_version))
         vars.append(self.set_vars("SDK machine:", src_config_info.curr_sdk_machine))
-        vars.append(self.set_vars("Tune feature:", src_params.tune_pkgarch))
+        vars.append(self.set_vars("Tune feature:", src_config_info.tune_pkgarch))
         vars.append(self.set_vars("Layers:", src_config_info.layers))
 
         for path in src_config_info.layers:
@@ -105,6 +105,9 @@  class BuildConfigurationTreeView(gtk.TreeView):
 
         self.set_config_model(vars)
 
+    def reset(self):
+        self.set_model(None)
+
 #
 # BuildDetailsPage
 #
@@ -208,6 +211,7 @@  class BuildDetailsPage (HobPage):
         self.box_group_area.pack_start(self.vbox, expand=True, fill=True)
 
         self.progress_bar.reset()
+        self.config_tv.reset()
         self.vbox.pack_start(self.progress_box, expand=False, fill=False)
 
         self.vbox.pack_start(self.notebook, expand=True, fill=True)
@@ -244,5 +248,5 @@  class BuildDetailsPage (HobPage):
                 if (v_adj.upper <= v_adj.page_size) or (v_adj.value == v_adj.upper - v_adj.page_size):
                     treeview.scroll_to_cell(path)
 
-    def show_configurations(self, configurations, params):
-        self.config_tv.show(configurations, params)
+    def show_configurations(self, configurations):
+        self.config_tv.show(configurations)
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 9e2495a..c0f4873 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -96,6 +96,12 @@  class Configuration:
         self.conf_version = params["conf_version"]
         self.lconf_version = params["lconf_version"]
         self.image_fstypes = params["image_fstypes"]
+        self.tune_arch = params["tune_arch"]
+        self.bb_version = params["bb_version"]
+        self.target_arch = params["target_arch"]
+        self.target_os = params["target_os"]
+        self.distro_version = params["distro_version"]
+        self.tune_pkgarch = params["tune_pkgarch"]
         # bblayers.conf
         self.layers = params["layer"].split()
 
@@ -201,12 +207,6 @@  class Parameters:
         self.runnable_machine_patterns = params["runnable_machine_patterns"].split()
         self.deployable_image_types = params["deployable_image_types"].split()
         self.tmpdir = params["tmpdir"]
-        self.distro_version = params["distro_version"]
-        self.target_os = params["target_os"]
-        self.target_arch = params["target_arch"]
-        self.tune_pkgarch = params["tune_pkgarch"]
-        self.bb_version = params["bb_version"]
-        self.tune_arch = params["tune_arch"]
         self.enable_proxy = False
 
 class Builder(gtk.Window):
@@ -653,7 +653,7 @@  class Builder(gtk.Window):
         elif self.current_step == self.PACKAGE_GENERATING:
             fraction = 0
         self.build_details_page.update_progress_bar("Build Started: ", fraction)
-        self.build_details_page.show_configurations(self.configuration, self.parameters)
+        self.build_details_page.show_configurations(self.configuration)
 
     def build_succeeded(self):
         if self.current_step == self.FAST_IMAGE_GENERATING: