summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/hob.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/hob.py')
-rw-r--r--bitbake/lib/bb/ui/hob.py24
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):