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
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):
364 self.handler.reset_build() 364 self.handler.reset_build()
365 self.handler.generate_packages(all_recipes) 365 self.handler.generate_packages(all_recipes)
366 366
367 def generate_image_async(self):
368 self.switch_page(self.IMAGE_GENERATING)
369 # Build image
370 self.set_user_config()
371 packages = self.package_model.get_selected_packages()
372 toolchain_packages = []
373 if self.configuration.toolchain_build:
374 toolchain_packages = self.package_model.get_selected_packages_toolchain()
375 self.handler.reset_build()
376 self.handler.generate_image(packages,
377 self.hob_image,
378 self.hob_toolchain,
379 toolchain_packages)
380
367 def load_template(self, path): 381 def load_template(self, path):
368 self.template = TemplateMgr() 382 self.template = TemplateMgr()
369 self.template.load(path) 383 self.template.load(path)
@@ -429,7 +443,6 @@ class Builder(gtk.Window):
429 # after packages are generated, selected_packages need to 443 # after packages are generated, selected_packages need to
430 # be updated in package_model per selected_image in recipe_model 444 # be updated in package_model per selected_image in recipe_model
431 self.build_details_page.show_page(next_step) 445 self.build_details_page.show_page(next_step)
432 self.generate_image()
433 446
434 elif next_step == self.IMAGE_GENERATED: 447 elif next_step == self.IMAGE_GENERATED:
435 self.image_details_page.show_page(next_step) 448 self.image_details_page.show_page(next_step)
@@ -478,19 +491,6 @@ class Builder(gtk.Window):
478 left = self.package_model.set_selected_packages(selected_packages) 491 left = self.package_model.set_selected_packages(selected_packages)
479 self.configuration.selected_packages += left 492 self.configuration.selected_packages += left
480 493
481 def generate_image(self):
482 # Build image
483 self.set_user_config()
484 packages = self.package_model.get_selected_packages()
485 toolchain_packages = []
486 if self.configuration.toolchain_build:
487 toolchain_packages = self.package_model.get_selected_packages_toolchain()
488 self.handler.reset_build()
489 self.handler.generate_image(packages,
490 self.hob_image,
491 self.hob_toolchain,
492 toolchain_packages)
493
494 # Callback Functions 494 # Callback Functions
495 def handler_config_updated_cb(self, handler, which, values): 495 def handler_config_updated_cb(self, handler, which, values):
496 if which == "distro": 496 if which == "distro":
@@ -529,7 +529,7 @@ class Builder(gtk.Window):
529 529
530 self.rcppkglist_populated() 530 self.rcppkglist_populated()
531 if self.current_step == self.FAST_IMAGE_GENERATING: 531 if self.current_step == self.FAST_IMAGE_GENERATING:
532 self.switch_page(self.IMAGE_GENERATING) 532 self.generate_image_async()
533 elif self.current_step == self.PACKAGE_GENERATING: 533 elif self.current_step == self.PACKAGE_GENERATING:
534 self.switch_page(self.PACKAGE_GENERATED) 534 self.switch_page(self.PACKAGE_GENERATED)
535 elif self.current_step == self.IMAGE_GENERATING: 535 elif self.current_step == self.IMAGE_GENERATING:
@@ -761,7 +761,7 @@ class Builder(gtk.Window):
761 dialog.run() 761 dialog.run()
762 dialog.destroy() 762 dialog.destroy()
763 return 763 return
764 self.switch_page(self.IMAGE_GENERATING) 764 self.generate_image_async()
765 765
766 def just_bake(self): 766 def just_bake(self):
767 selected_image = self.recipe_model.get_selected_image() 767 selected_image = self.recipe_model.get_selected_image()