summaryrefslogtreecommitdiffstats
path: root/lib/bb/ui/crumbs/builder.py
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-05-23 23:19:44 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-23 18:16:50 +0100
commit2c4a21dc8a588c8cf05549ddd9734731a46bea10 (patch)
treed38a2ccec8ac343b87d2e649b3dbb439d3180b50 /lib/bb/ui/crumbs/builder.py
parent588da606eb81c52cb92d29041e1c67897427bfdf (diff)
downloadbitbake-2c4a21dc8a588c8cf05549ddd9734731a46bea10.tar.gz
Hob: Adjust the progress bar and set 100% only when all is done.
After parsing recipes, Hob will populate recipes and packages, which is probably time exhaused. So, this patch is to adjust the progress bar and ensure 100% is set if and only if all populations are done. The patch also fixes "weird 18 second delay when parsing recipes" on build appliance. Because Hob is doing something, but the progress bar shows 100% and wait there. [Yocto #2341] Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/ui/crumbs/builder.py')
-rwxr-xr-xlib/bb/ui/crumbs/builder.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 141ee2c56..80a8d0160 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -424,6 +424,8 @@ class Builder(gtk.Window):
self.handler.connect("data-generated", self.handler_data_generated_cb)
self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
self.handler.connect("command-failed", self.handler_command_failed_cb)
+ self.handler.connect("recipe-populated", self.handler_recipe_populated_cb)
+ self.handler.connect("package-populated", self.handler_package_populated_cb)
self.handler.set_config_filter(hob_conf_filter)
@@ -773,6 +775,12 @@ class Builder(gtk.Window):
def packagelist_changed_cb(self, package_model):
self.package_details_page.refresh_selection()
+ def handler_recipe_populated_cb(self, handler):
+ self.image_configuration_page.update_progress_bar("Populated recipes", 0.99)
+
+ def handler_package_populated_cb(self, handler):
+ self.image_configuration_page.update_progress_bar("Populated packages", 1.0)
+
def handler_parsing_started_cb(self, handler, message):
if self.current_step != self.RCPPKGINFO_POPULATING:
return
@@ -792,7 +800,7 @@ class Builder(gtk.Window):
fraction = message["current"] * 1.0/message["total"]
if message["eventname"] == "TreeDataPreparationProgress":
- fraction = 0.6 + 0.4 * fraction
+ fraction = 0.6 + 0.38 * fraction
else:
fraction = 0.6 * fraction
self.image_configuration_page.update_progress_bar(message["title"], fraction)
@@ -802,7 +810,7 @@ class Builder(gtk.Window):
return
if message["eventname"] == "TreeDataPreparationCompleted":
- fraction = 1.0
+ fraction = 0.98
else:
fraction = 0.6
self.image_configuration_page.update_progress_bar(message["title"], fraction)