summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-04-09 22:13:36 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-11 00:04:44 +0100
commit8d353411c10a75de109eb5853fdc0b23bfca763a (patch)
treee114e3e5a15c91c81d8b07145f3ec5cf36432444
parente2c1092905ceb0e7fc0a6141a9d3e36b89ec31f4 (diff)
downloadpoky-8d353411c10a75de109eb5853fdc0b23bfca763a.tar.gz
poky-8d353411c10a75de109eb5853fdc0b23bfca763a.tar.bz2
poky-8d353411c10a75de109eb5853fdc0b23bfca763a.zip
Hob: clean up and unify the steps for new build to call initiate_new_build_async()
initiate_new_build() (changed the function name into initiate_new_build_async() to indicate it is an async function) or the similar sub-functions are called at different places. This patch is unify to call initiate_new_build_async(). (Bitbake rev: ec42be626a5d6362a09f12f4f4025ad92d70c89b) 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.py19
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/imagedetailspage.py2
2 files changed, 8 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index bc7e61094c..0f32d33b2e 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -297,11 +297,7 @@ class Builder(gtk.Window):
self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
self.handler.connect("command-failed", self.handler_command_failed_cb)
- self.handler.init_cooker()
- self.handler.set_extra_inherit("image_types")
- self.handler.parse_config()
-
- self.switch_page(self.MACHINE_SELECTION)
+ self.initiate_new_build_async()
def create_visual_elements(self):
self.set_title("Hob")
@@ -337,6 +333,12 @@ class Builder(gtk.Window):
self.show_all()
self.nb.set_current_page(0)
+ def initiate_new_build_async(self):
+ self.switch_page(self.MACHINE_SELECTION)
+ self.handler.init_cooker()
+ self.handler.set_extra_inherit("image_types")
+ self.handler.parse_config()
+
def load_template(self, path):
self.template = TemplateMgr()
self.template.load(path)
@@ -990,13 +992,6 @@ class Builder(gtk.Window):
def show_recipes(self):
self.switch_page(self.RECIPE_SELECTION)
- def initiate_new_build(self):
- self.handler.init_cooker()
- self.handler.set_extra_inherit("image_types")
- self.handler.parse_config()
- self.image_configuration_page.switch_machine_combo()
- self.switch_page(self.MACHINE_SELECTION)
-
def show_configuration(self):
self.switch_page(self.BASEIMG_SELECTED)
diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
index 277f9d4b4d..be112d43d7 100755
--- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
@@ -380,7 +380,7 @@ class ImageDetailsPage (HobPage):
self.builder.runqemu_image(image_name)
def build_new_button_clicked_cb(self, button):
- self.builder.initiate_new_build()
+ self.builder.initiate_new_build_async()
def edit_config_button_clicked_cb(self, button):
self.builder.show_configuration()