All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shane Wang <shane.wang@intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH 10/21] Hob: clean up and unify the steps for IMAGE_GENERATING to call generate_image_async()
Date: Mon,  9 Apr 2012 22:13:40 +0800	[thread overview]
Message-ID: <b07f24ba2fde9906cef4f5a946c9eeab03da79cf.1333980505.git.shane.wang@intel.com> (raw)
In-Reply-To: <0858ca0732e2d6a66b84e97150a750714ae806c9.1333980504.git.shane.wang@intel.com>
In-Reply-To: <cover.1333980504.git.shane.wang@intel.com>

For the steps in IMAGE_GENERATING, the patch consolidates them into
generate_image_async() to call.

Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py |   32 ++++++++++++++++----------------
 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 8a95b94..959d8c1 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -361,6 +361,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)
@@ -426,7 +440,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)
@@ -475,19 +488,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":
@@ -526,7 +526,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:
@@ -758,7 +758,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()
-- 
1.7.6




  parent reply	other threads:[~2012-04-09 14:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 14:09 [PATCH 00/21] [Resend] Hob fixes and cleanups Shane Wang
2012-04-09 14:13 ` [PATCH 01/21] Hob: fix version check - Hob can run on pygtk 2.21.0 Shane Wang
2012-04-09 16:47   ` Joshua Lock
2012-04-09 14:13 ` [PATCH 02/21] Hob: add fadeout display effection for recipe view include page Shane Wang
2012-04-09 14:13 ` [PATCH 03/21] Hob: add fadeout display effection for package " Shane Wang
2012-04-09 14:13 ` [PATCH 04/21] Hob: Add the tooltips for recipe view page as request Shane Wang
2012-04-09 14:13 ` [PATCH 05/21] Hob: correct indent Shane Wang
2012-04-09 14:13 ` [PATCH 06/21] Hob: clean up and unify the steps for new build to call initiate_new_build_async() Shane Wang
2012-04-09 14:13 ` [PATCH 07/21] Hob: clean up and unify the steps for CONFIG_UPDATE to call update_config_async() Shane Wang
2012-04-09 14:13 ` [PATCH 08/21] Hob: clean up and unify the steps for RCPPKGINFO_POPULATING to call populate_recipe_package_info_async() Shane Wang
2012-04-09 14:13 ` [PATCH 09/21] Hob: clean up and unify the steps for PACKAGE_GENERATING and FAST_IMAGE_GENERATING to call generate_packages_async() and fast_generate_image_async() Shane Wang
2012-04-09 14:13 ` Shane Wang [this message]
2012-04-09 14:13 ` [PATCH 11/21] Hob: clean up to call clear_busy() in hobeventhandler.py Shane Wang
2012-04-09 14:13 ` [PATCH 12/21] Hob: clean up and unify get_parameters() to be get_parameters_sync() Shane Wang
2012-04-09 14:13 ` [PATCH 13/21] Hob: clean up request_package_info_async() Shane Wang
2012-04-09 14:13 ` [PATCH 14/21] Hob: clean up cancel_build() Shane Wang
2012-04-09 14:13 ` [PATCH 15/21] Hob: clean up generate_configuration() Shane Wang
2012-04-09 14:13 ` [PATCH 16/21] Hob: clean up and reword stop_parse() Shane Wang
2012-04-09 14:13 ` [PATCH 17/21] Hob: tooltip change for "Build image" button Shane Wang
2012-04-09 14:13 ` [PATCH 18/21] Hob: add tooltips into image details screen Shane Wang
2012-04-09 14:13 ` [PATCH 19/21] Hob: forget selected_recipes and selected_packages after users change the machine Shane Wang
2012-04-09 14:13 ` [PATCH 20/21] Hob: show those appliable buttons on the image details page only Shane Wang
2012-04-09 14:13 ` [PATCH 21/21] Hob:Fixed some incorrect values of Build configuration tab Shane Wang
2012-04-10 22:48 ` [PATCH 00/21] [Resend] Hob fixes and cleanups Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b07f24ba2fde9906cef4f5a946c9eeab03da79cf.1333980505.git.shane.wang@intel.com \
    --to=shane.wang@intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.