Patchwork [bitbake-devel] hob: replace the use of hob-toolchain with populate_sdk task

login
register
mail settings
Submitter Cristiana Voicu
Date Feb. 25, 2014, 7:15 a.m.
Message ID <1393312531-699-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/67381/
State New
Headers show

Comments

Cristiana Voicu - Feb. 25, 2014, 7:15 a.m.
Now bitbake has an API to run individual task for targets.
Hob can use this to build the sdk, instead of using the hob-
toolchain.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py         |    2 --
 bitbake/lib/bb/ui/crumbs/hobeventhandler.py |   16 ++++++++--------
 2 files changed, 8 insertions(+), 10 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 1e26d44..5ae1ddb 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -380,7 +380,6 @@  class Builder(gtk.Window):
         super(Builder, self).__init__()
 
         self.hob_image = "hob-image"
-        self.hob_toolchain = "hob-toolchain"
 
         # handler
         self.handler = hobHandler
@@ -597,7 +596,6 @@  class Builder(gtk.Window):
             image = self.configuration.selected_image
         self.handler.generate_image(image,
                                     base_image,
-                                    self.hob_toolchain,
                                     packages,
                                     toolchain_packages,
                                     self.configuration.default_task)
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 3792328..1282070 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -164,18 +164,19 @@  class HobHandler(gobject.GObject):
         elif next_command == self.SUB_BUILD_IMAGE:
             self.clear_busy()
             self.building = True
-            targets = [self.image]
-            if self.toolchain_packages:
-                self.set_var_in_file("TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages), "local.conf")
-                targets.append(self.toolchain)
-            if targets[0] == "hob-image":
+            target = self.image
+            if target == "hob-image":
                 self.set_var_in_file("LINGUAS_INSTALL", "", "local.conf")
                 hobImage = self.runCommand(["matchFile", "hob-image.bb"])
                 if self.base_image != "Start with an empty image recipe":
                     baseImage = self.runCommand(["matchFile", self.base_image + ".bb"])
                     version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True, ""])
-                    targets[0] += version
+                    target += version
                     self.recipe_model.set_custom_image_version(version)
+            targets = [target]
+            if self.toolchain_packages:
+                self.set_var_in_file("TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages), "local.conf")
+                targets.append(target + ":do_populate_sdk")
 
             self.runCommand(["buildTargets", targets, self.default_task])
 
@@ -423,10 +424,9 @@  class HobHandler(gobject.GObject):
         self.commands_async.append(self.SUB_BUILD_RECIPES)
         self.run_next_command(self.GENERATE_PACKAGES)
 
-    def generate_image(self, image, base_image, toolchain, image_packages=[], toolchain_packages=[], default_task="build"):
+    def generate_image(self, image, base_image, image_packages=[], toolchain_packages=[], default_task="build"):
         self.image = image
         self.base_image = base_image
-        self.toolchain = toolchain
         self.package_queue = image_packages
         self.toolchain_packages = toolchain_packages
         self.default_task = default_task