summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-04-09 22:13:39 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-11 00:04:45 +0100
commit35317bd2c2d017bbf21d45a651b9b76a8afe879f (patch)
treeebfe80a6caad5e2ae7ccecdbb3fa0e2b96dde77d
parent47caae2f2185cb9b1b8e597189128c57f47cc940 (diff)
downloadpoky-35317bd2c2d017bbf21d45a651b9b76a8afe879f.tar.gz
poky-35317bd2c2d017bbf21d45a651b9b76a8afe879f.tar.bz2
poky-35317bd2c2d017bbf21d45a651b9b76a8afe879f.zip
Hob: clean up and unify the steps for PACKAGE_GENERATING and FAST_IMAGE_GENERATING to call generate_packages_async() and fast_generate_image_async()
For the steps in PACKAGE_GENERATING, the patch consolidates them into generate_packages_async() to call. For the steps in FAST_IMAGE_GENERATING, the patch also consolidates them into fast_generate_image_async() to call. (Bitbake rev: 1ec53d41774528ab01e835d1cf4166f0202a7c38) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py30
1 files changed, 19 insertions, 11 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 63e6f0b31a..d1f419aa8c 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -348,6 +348,22 @@ class Builder(gtk.Window):
self.set_user_config()
self.handler.generate_recipes()
+ def generate_packages_async(self):
+ self.switch_page(self.PACKAGE_GENERATING)
+ # Build packages
+ _, all_recipes = self.recipe_model.get_selected_recipes()
+ self.set_user_config()
+ self.handler.reset_build()
+ self.handler.generate_packages(all_recipes)
+
+ def fast_generate_image_async(self):
+ self.switch_page(self.FAST_IMAGE_GENERATING)
+ # Build packages
+ _, all_recipes = self.recipe_model.get_selected_recipes()
+ self.set_user_config()
+ self.handler.reset_build()
+ self.handler.generate_packages(all_recipes)
+
def load_template(self, path):
self.template = TemplateMgr()
self.template.load(path)
@@ -405,7 +421,6 @@ class Builder(gtk.Window):
elif next_step == self.PACKAGE_GENERATING or next_step == self.FAST_IMAGE_GENERATING:
# both PACKAGE_GENEATING and FAST_IMAGE_GENERATING share the same page
self.build_details_page.show_page(next_step)
- self.generate_packages()
elif next_step == self.PACKAGE_GENERATED:
pass
@@ -463,13 +478,6 @@ class Builder(gtk.Window):
left = self.package_model.set_selected_packages(selected_packages)
self.configuration.selected_packages += left
- def generate_packages(self):
- # Build packages
- _, all_recipes = self.recipe_model.get_selected_recipes()
- self.set_user_config()
- self.handler.reset_build()
- self.handler.generate_packages(all_recipes)
-
def generate_image(self):
# Build image
self.set_user_config()
@@ -740,7 +748,7 @@ class Builder(gtk.Window):
dialog.run()
dialog.destroy()
return
- self.switch_page(self.PACKAGE_GENERATING)
+ self.generate_packages_async()
def build_image(self):
selected_packages = self.package_model.get_selected_packages()
@@ -770,7 +778,7 @@ class Builder(gtk.Window):
dialog.destroy()
return
- self.switch_page(self.FAST_IMAGE_GENERATING)
+ self.fast_generate_image_async()
def show_binb_dialog(self, binb):
markup = "<b>Brought in by:</b>\n%s" % binb
@@ -980,7 +988,7 @@ class Builder(gtk.Window):
response = dialog.run()
dialog.destroy()
if response == gtk.RESPONSE_YES:
- self.switch_page(self.PACKAGE_GENERATING)
+ self.generate_packages_async()
else:
self.switch_page(self.PACKAGE_SELECTION)
else: