diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-07-15 10:30:48 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-26 20:15:47 +0100 |
commit | 2d608f837d51c900dacadeb9737fbde068578d8a (patch) | |
tree | a56305cb5cc6e7ce1438c0c74b85728d834ac169 /bitbake/lib/bb/ui/hob.py | |
parent | 6d76379af89aafb3757d60bc67b96c6f65ca8455 (diff) | |
download | poky-2d608f837d51c900dacadeb9737fbde068578d8a.tar.gz |
ui/hob: switch from buildFile to buildTargets for custom image builds
We need to use the buildTargets command to ensure dependencies, such as
native tools to build the rootfs, are correctly included. This patch
achieves this by modifying BBPATH and BBFILES to include matches for the
location of the generated recipe file and reparsing the metadata before
calling buildTargets.
Fixes [YOCTO #1228]
(Bitbake rev: 5840d59098141e773c12bea8ed8d9f4f1a706132)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/hob.py')
-rw-r--r-- | bitbake/lib/bb/ui/hob.py | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index 448d590e49..654d2dfc71 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py | |||
@@ -65,10 +65,8 @@ class MainWindow (gtk.Window): | |||
65 | 65 | ||
66 | self.build = RunningBuild() | 66 | self.build = RunningBuild() |
67 | self.build.connect("build-failed", self.running_build_failed_cb) | 67 | self.build.connect("build-failed", self.running_build_failed_cb) |
68 | self.build.connect("build-complete", self.handler.build_complete_cb) | ||
69 | self.build.connect("build-started", self.build_started_cb) | 68 | self.build.connect("build-started", self.build_started_cb) |
70 | 69 | self.build.connect("build-complete", self.build_complete_cb) | |
71 | self.handler.connect("build-complete", self.build_complete_cb) | ||
72 | 70 | ||
73 | vbox = gtk.VBox(False, 0) | 71 | vbox = gtk.VBox(False, 0) |
74 | vbox.set_border_width(0) | 72 | vbox.set_border_width(0) |
@@ -373,16 +371,15 @@ class MainWindow (gtk.Window): | |||
373 | dialog.destroy() | 371 | dialog.destroy() |
374 | if response == gtk.RESPONSE_CANCEL: | 372 | if response == gtk.RESPONSE_CANCEL: |
375 | return | 373 | return |
376 | else: | ||
377 | # TODO: show a confirmation dialog ? | ||
378 | if not self.save_path: | ||
379 | import tempfile, datetime | ||
380 | image_name = "hob-%s-variant-%s.bb" % (rep.base_image, datetime.date.today().isoformat()) | ||
381 | image_dir = os.path.join(tempfile.gettempdir(), 'hob-images') | ||
382 | bb.utils.mkdirhier(image_dir) | ||
383 | recipepath = os.path.join(image_dir, image_name) | ||
384 | else: | 374 | else: |
385 | recipepath = self.save_path | 375 | self.handler.build_packages(rep.allpkgs.split(" ")) |
376 | else: | ||
377 | import tempfile, datetime | ||
378 | image_name = "hob-%s-variant-%s" % (rep.base_image, datetime.date.today().isoformat()) | ||
379 | image_file = "%s.bb" % (image_name) | ||
380 | image_dir = os.path.join(tempfile.gettempdir(), 'hob-images') | ||
381 | bb.utils.mkdirhier(image_dir) | ||
382 | recipepath = os.path.join(image_dir, image_file) | ||
386 | 383 | ||
387 | rep.writeRecipe(recipepath, self.model) | 384 | rep.writeRecipe(recipepath, self.model) |
388 | # In the case where we saved the file for the purpose of building | 385 | # In the case where we saved the file for the purpose of building |
@@ -391,9 +388,8 @@ class MainWindow (gtk.Window): | |||
391 | if not self.save_path: | 388 | if not self.save_path: |
392 | self.files_to_clean.append(recipepath) | 389 | self.files_to_clean.append(recipepath) |
393 | 390 | ||
394 | self.handler.queue_image_recipe_path(recipepath) | 391 | self.handler.build_image(image_name, image_dir, self.configurator) |
395 | 392 | ||
396 | self.handler.build_packages(rep.allpkgs.split(" ")) | ||
397 | self.nb.set_current_page(1) | 393 | self.nb.set_current_page(1) |
398 | 394 | ||
399 | def back_button_clicked_cb(self, button): | 395 | def back_button_clicked_cb(self, button): |