summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-04-09 22:13:40 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-11 00:04:45 +0100
commit21901e0ada51a9fcba317b1d2207c2b28876b8ee (patch)
tree68b63f4fb85d223dca59ed4d8021b3ea995a435c
parent35317bd2c2d017bbf21d45a651b9b76a8afe879f (diff)
downloadpoky-21901e0ada51a9fcba317b1d2207c2b28876b8ee.tar.gz
poky-21901e0ada51a9fcba317b1d2207c2b28876b8ee.tar.bz2
poky-21901e0ada51a9fcba317b1d2207c2b28876b8ee.zip
Hob: clean up and unify the steps for IMAGE_GENERATING to call generate_image_async()
For the steps in IMAGE_GENERATING, the patch consolidates them into generate_image_async() to call. (Bitbake rev: d4f2335e40d4d667847d3faed79bcee74baeea37) 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.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index d1f419aa8c..1730c77589 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -364,6 +364,20 @@ class Builder(gtk.Window):
self.handler.reset_build()
self.handler.generate_packages(all_recipes)
+ def generate_image_async(self):
+ self.switch_page(self.IMAGE_GENERATING)
+ # Build image
+ self.set_user_config()
+ packages = self.package_model.get_selected_packages()
+ toolchain_packages = []
+ if self.configuration.toolchain_build:
+ toolchain_packages = self.package_model.get_selected_packages_toolchain()
+ self.handler.reset_build()
+ self.handler.generate_image(packages,
+ self.hob_image,
+ self.hob_toolchain,
+ toolchain_packages)
+
def load_template(self, path):
self.template = TemplateMgr()
self.template.load(path)
@@ -429,7 +443,6 @@ class Builder(gtk.Window):
# after packages are generated, selected_packages need to
# be updated in package_model per selected_image in recipe_model
self.build_details_page.show_page(next_step)
- self.generate_image()
elif next_step == self.IMAGE_GENERATED:
self.image_details_page.show_page(next_step)
@@ -478,19 +491,6 @@ class Builder(gtk.Window):
left = self.package_model.set_selected_packages(selected_packages)
self.configuration.selected_packages += left
- def generate_image(self):
- # Build image
- self.set_user_config()
- packages = self.package_model.get_selected_packages()
- toolchain_packages = []
- if self.configuration.toolchain_build:
- toolchain_packages = self.package_model.get_selected_packages_toolchain()
- self.handler.reset_build()
- self.handler.generate_image(packages,
- self.hob_image,
- self.hob_toolchain,
- toolchain_packages)
-
# Callback Functions
def handler_config_updated_cb(self, handler, which, values):
if which == "distro":
@@ -529,7 +529,7 @@ class Builder(gtk.Window):
self.rcppkglist_populated()
if self.current_step == self.FAST_IMAGE_GENERATING:
- self.switch_page(self.IMAGE_GENERATING)
+ self.generate_image_async()
elif self.current_step == self.PACKAGE_GENERATING:
self.switch_page(self.PACKAGE_GENERATED)
elif self.current_step == self.IMAGE_GENERATING:
@@ -761,7 +761,7 @@ class Builder(gtk.Window):
dialog.run()
dialog.destroy()
return
- self.switch_page(self.IMAGE_GENERATING)
+ self.generate_image_async()
def just_bake(self):
selected_image = self.recipe_model.get_selected_image()