summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2013-07-29 09:55:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-06 13:02:24 +0100
commit140744c4701bcac0dd61e11303d008f2ea34fc1b (patch)
tree56d29d44308a0c357069b6e7957317a88111c273 /bitbake/lib/bb/ui/crumbs/hobeventhandler.py
parentee4fe5a229125d01cf8b697c759d0852f9a715a8 (diff)
downloadpoky-140744c4701bcac0dd61e11303d008f2ea34fc1b.tar.gz
bitbake: hob/bitbake: create a template (a .bb file) from hob through bitbake
Modified generateNewImage function from cooker, in order to be used to save a template in Hob. Created a command to ensure that some dirs are created. The templates (recipes) will be saved in {TOPDIR}/recipes/images folder. Called these methods from Hob. [YOCTO #4193] (Bitbake rev: 96ffa00945c7eb09a0132fa47159aef3ef20fb3e) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 294eb5dd1f..34cd3478ed 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -176,7 +176,7 @@ class HobHandler(gobject.GObject):
176 hobImage = self.runCommand(["matchFile", "hob-image.bb"]) 176 hobImage = self.runCommand(["matchFile", "hob-image.bb"])
177 if self.base_image != "Start with an empty image recipe": 177 if self.base_image != "Start with an empty image recipe":
178 baseImage = self.runCommand(["matchFile", self.base_image + ".bb"]) 178 baseImage = self.runCommand(["matchFile", self.base_image + ".bb"])
179 version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue]) 179 version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True])
180 targets[0] += version 180 targets[0] += version
181 self.recipe_model.set_custom_image_version(version) 181 self.recipe_model.set_custom_image_version(version)
182 182
@@ -426,6 +426,13 @@ class HobHandler(gobject.GObject):
426 self.commands_async.append(self.SUB_BUILD_IMAGE) 426 self.commands_async.append(self.SUB_BUILD_IMAGE)
427 self.run_next_command(self.GENERATE_IMAGE) 427 self.run_next_command(self.GENERATE_IMAGE)
428 428
429 def generate_new_image(self, image, base_image, package_queue):
430 base_image = self.runCommand(["matchFile", self.base_image + ".bb"])
431 self.runCommand(["generateNewImage", image, base_image, package_queue, False])
432
433 def ensure_dir(self, directory):
434 self.runCommand(["ensureDir", directory])
435
429 def build_succeeded_async(self): 436 def build_succeeded_async(self):
430 self.building = False 437 self.building = False
431 438