summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/hob.py
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-18 16:22:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-26 20:15:47 +0100
commit40f0e6dbd4ff449e517c5eb6161cf734d7b64c64 (patch)
treec0c0aec95d6aa7ea7868011d2b130eed93619b1c /bitbake/lib/bb/ui/hob.py
parent2d608f837d51c900dacadeb9737fbde068578d8a (diff)
downloadpoky-40f0e6dbd4ff449e517c5eb6161cf734d7b64c64.tar.gz
ui/hob: don't offer to show built output if build fails
The link to open the deploy directory should only be shown if the build completed succesfully. (Bitbake rev: d947f9880c2205be66fbd61cf7d3728275979a56) 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.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index 654d2dfc71..e0380dd11e 100644
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -57,6 +57,7 @@ class MainWindow (gtk.Window):
57 self.layers = layers 57 self.layers = layers
58 self.save_path = None 58 self.save_path = None
59 self.dirty = False 59 self.dirty = False
60 self.build_succeeded = False
60 61
61 self.connect("delete-event", self.destroy_window) 62 self.connect("delete-event", self.destroy_window)
62 self.set_title("Image Creator") 63 self.set_title("Image Creator")
@@ -65,6 +66,7 @@ class MainWindow (gtk.Window):
65 66
66 self.build = RunningBuild() 67 self.build = RunningBuild()
67 self.build.connect("build-failed", self.running_build_failed_cb) 68 self.build.connect("build-failed", self.running_build_failed_cb)
69 self.build.connect("build-succeeded", self.running_build_succeeded_cb)
68 self.build.connect("build-started", self.build_started_cb) 70 self.build.connect("build-started", self.build_started_cb)
69 self.build.connect("build-complete", self.build_complete_cb) 71 self.build.connect("build-complete", self.build_complete_cb)
70 72
@@ -113,9 +115,11 @@ class MainWindow (gtk.Window):
113 def scroll_tv_cb(self, model, path, it, view): 115 def scroll_tv_cb(self, model, path, it, view):
114 view.scroll_to_cell(path) 116 view.scroll_to_cell(path)
115 117
118 def running_build_succeeded_cb(self, running_build):
119 self.build_succeeded = True
120
116 def running_build_failed_cb(self, running_build): 121 def running_build_failed_cb(self, running_build):
117 # FIXME: handle this 122 self.build_succeeded = False
118 print("Build failed")
119 123
120 def image_changed_string_cb(self, model, new_image): 124 def image_changed_string_cb(self, model, new_image):
121 cnt = 0 125 cnt = 0
@@ -408,7 +412,7 @@ class MainWindow (gtk.Window):
408 os.remove(f) 412 os.remove(f)
409 413
410 lbl = "<b>Build completed</b>\n\nClick 'Edit Image' to start another build or 'View Log' to view the build log." 414 lbl = "<b>Build completed</b>\n\nClick 'Edit Image' to start another build or 'View Log' to view the build log."
411 if self.handler.building == "image": 415 if self.handler.building == "image" and self.build_succeeded:
412 deploy = self.handler.get_image_deploy_dir() 416 deploy = self.handler.get_image_deploy_dir()
413 lbl = lbl + "\n<a href=\"file://%s\" title=\"%s\">Browse folder of built images</a>." % (deploy, deploy) 417 lbl = lbl + "\n<a href=\"file://%s\" title=\"%s\">Browse folder of built images</a>." % (deploy, deploy)
414 418