summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
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 /bitbake/lib/bb
parent47caae2f2185cb9b1b8e597189128c57f47cc940 (diff)
downloadpoky-35317bd2c2d017bbf21d45a651b9b76a8afe879f.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb')
-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):
348 self.set_user_config() 348 self.set_user_config()
349 self.handler.generate_recipes() 349 self.handler.generate_recipes()
350 350
351 def generate_packages_async(self):
352 self.switch_page(self.PACKAGE_GENERATING)
353 # Build packages
354 _, all_recipes = self.recipe_model.get_selected_recipes()
355 self.set_user_config()
356 self.handler.reset_build()
357 self.handler.generate_packages(all_recipes)
358
359 def fast_generate_image_async(self):
360 self.switch_page(self.FAST_IMAGE_GENERATING)
361 # Build packages
362 _, all_recipes = self.recipe_model.get_selected_recipes()
363 self.set_user_config()
364 self.handler.reset_build()
365 self.handler.generate_packages(all_recipes)
366
351 def load_template(self, path): 367 def load_template(self, path):
352 self.template = TemplateMgr() 368 self.template = TemplateMgr()
353 self.template.load(path) 369 self.template.load(path)
@@ -405,7 +421,6 @@ class Builder(gtk.Window):
405 elif next_step == self.PACKAGE_GENERATING or next_step == self.FAST_IMAGE_GENERATING: 421 elif next_step == self.PACKAGE_GENERATING or next_step == self.FAST_IMAGE_GENERATING:
406 # both PACKAGE_GENEATING and FAST_IMAGE_GENERATING share the same page 422 # both PACKAGE_GENEATING and FAST_IMAGE_GENERATING share the same page
407 self.build_details_page.show_page(next_step) 423 self.build_details_page.show_page(next_step)
408 self.generate_packages()
409 424
410 elif next_step == self.PACKAGE_GENERATED: 425 elif next_step == self.PACKAGE_GENERATED:
411 pass 426 pass
@@ -463,13 +478,6 @@ class Builder(gtk.Window):
463 left = self.package_model.set_selected_packages(selected_packages) 478 left = self.package_model.set_selected_packages(selected_packages)
464 self.configuration.selected_packages += left 479 self.configuration.selected_packages += left
465 480
466 def generate_packages(self):
467 # Build packages
468 _, all_recipes = self.recipe_model.get_selected_recipes()
469 self.set_user_config()
470 self.handler.reset_build()
471 self.handler.generate_packages(all_recipes)
472
473 def generate_image(self): 481 def generate_image(self):
474 # Build image 482 # Build image
475 self.set_user_config() 483 self.set_user_config()
@@ -740,7 +748,7 @@ class Builder(gtk.Window):
740 dialog.run() 748 dialog.run()
741 dialog.destroy() 749 dialog.destroy()
742 return 750 return
743 self.switch_page(self.PACKAGE_GENERATING) 751 self.generate_packages_async()
744 752
745 def build_image(self): 753 def build_image(self):
746 selected_packages = self.package_model.get_selected_packages() 754 selected_packages = self.package_model.get_selected_packages()
@@ -770,7 +778,7 @@ class Builder(gtk.Window):
770 dialog.destroy() 778 dialog.destroy()
771 return 779 return
772 780
773 self.switch_page(self.FAST_IMAGE_GENERATING) 781 self.fast_generate_image_async()
774 782
775 def show_binb_dialog(self, binb): 783 def show_binb_dialog(self, binb):
776 markup = "<b>Brought in by:</b>\n%s" % binb 784 markup = "<b>Brought in by:</b>\n%s" % binb
@@ -980,7 +988,7 @@ class Builder(gtk.Window):
980 response = dialog.run() 988 response = dialog.run()
981 dialog.destroy() 989 dialog.destroy()
982 if response == gtk.RESPONSE_YES: 990 if response == gtk.RESPONSE_YES:
983 self.switch_page(self.PACKAGE_GENERATING) 991 self.generate_packages_async()
984 else: 992 else:
985 self.switch_page(self.PACKAGE_SELECTION) 993 self.switch_page(self.PACKAGE_SELECTION)
986 else: 994 else: