summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/builddetailspage.py
diff options
context:
space:
mode:
authorCristiana Voicu <cristiana.voicu@intel.com>2012-11-20 14:37:46 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-25 21:36:44 +0000
commitf26d3e8d5f735c7439bed234d0eb030215cded98 (patch)
tree95f81a5f99d055fed82cb41b30eb21d7ea00c9d2 /bitbake/lib/bb/ui/crumbs/builddetailspage.py
parent7cbc3cf64bf68138fbbbb8bcae76ecd22d583c98 (diff)
downloadpoky-f26d3e8d5f735c7439bed234d0eb030215cded98.tar.gz
bitbake: hob: showing when build fails because out of disk space
-to enable this in hob, first you have to enable this in bitbake using BB_DISKMON_DIRS and/or BB_DISKMON_WARNINTERVAL vars -created "restart the build" action on the build_fail_top_bar [YOCTO #3357] (Bitbake rev: 964ac25d153ff4da144963289a32066db0e28b89) 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/builddetailspage.py')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builddetailspage.py38
1 files changed, 32 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
index 1afacf85bd..6d8c38bd67 100755
--- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
@@ -206,8 +206,6 @@ class BuildDetailsPage (HobPage):
206 def add_build_fail_top_bar(self, actions, log_file=None): 206 def add_build_fail_top_bar(self, actions, log_file=None):
207 primary_action = "Edit %s" % actions 207 primary_action = "Edit %s" % actions
208 208
209 self.notebook.set_page("Issues")
210
211 color = HobColors.ERROR 209 color = HobColors.ERROR
212 build_fail_top = gtk.EventBox() 210 build_fail_top = gtk.EventBox()
213 #build_fail_top.set_size_request(-1, 200) 211 #build_fail_top.set_size_request(-1, 200)
@@ -228,7 +226,17 @@ class BuildDetailsPage (HobPage):
228 226
229 label = gtk.Label() 227 label = gtk.Label()
230 label.set_alignment(0.0, 0.5) 228 label.set_alignment(0.0, 0.5)
231 label.set_markup("<span size='medium'>Check the \"Issues\" information for more details</span>") 229 # Ensure variable disk_full is defined
230 try:
231 self.builder.disk_full
232 except NameError:
233 self.builder.disk_full = False
234 if self.builder.disk_full:
235 markup = "<span size='medium'>There is no disk space left, so Hob cannot finish building your image. Free up some disk space\n"
236 markup += "and restart the build. Check the \"Issues\" tab for more details</span>"
237 label.set_markup(markup)
238 else:
239 label.set_markup("<span size='medium'>Check the \"Issues\" information for more details</span>")
232 build_fail_tab.attach(label, 4, 40, 4, 9) 240 build_fail_tab.attach(label, 4, 40, 4, 9)
233 241
234 # create button 'Edit packages' 242 # create button 'Edit packages'
@@ -236,22 +244,36 @@ class BuildDetailsPage (HobPage):
236 #action_button.set_size_request(-1, 40) 244 #action_button.set_size_request(-1, 40)
237 action_button.set_tooltip_text("Edit the %s parameters" % actions) 245 action_button.set_tooltip_text("Edit the %s parameters" % actions)
238 action_button.connect('clicked', self.failure_primary_action_button_clicked_cb, primary_action) 246 action_button.connect('clicked', self.failure_primary_action_button_clicked_cb, primary_action)
239 build_fail_tab.attach(action_button, 4, 13, 9, 12)
240 247
241 if log_file: 248 if log_file:
242 open_log_button = HobAltButton("Open log") 249 open_log_button = HobAltButton("Open log")
243 open_log_button.set_relief(gtk.RELIEF_HALF) 250 open_log_button.set_relief(gtk.RELIEF_HALF)
244 open_log_button.set_tooltip_text("Open the build's log file") 251 open_log_button.set_tooltip_text("Open the build's log file")
245 open_log_button.connect('clicked', self.open_log_button_clicked_cb, log_file) 252 open_log_button.connect('clicked', self.open_log_button_clicked_cb, log_file)
246 build_fail_tab.attach(open_log_button, 14, 23, 9, 12)
247 253
248 attach_pos = (24 if log_file else 14) 254 attach_pos = (24 if log_file else 14)
249 file_bug_button = HobAltButton('File a bug') 255 file_bug_button = HobAltButton('File a bug')
250 file_bug_button.set_relief(gtk.RELIEF_HALF) 256 file_bug_button.set_relief(gtk.RELIEF_HALF)
251 file_bug_button.set_tooltip_text("Open the Yocto Project bug tracking website") 257 file_bug_button.set_tooltip_text("Open the Yocto Project bug tracking website")
252 file_bug_button.connect('clicked', self.failure_activate_file_bug_link_cb) 258 file_bug_button.connect('clicked', self.failure_activate_file_bug_link_cb)
253 build_fail_tab.attach(file_bug_button, attach_pos, attach_pos + 9, 9, 12)
254 259
260 if not self.builder.disk_full:
261 build_fail_tab.attach(action_button, 4, 13, 9, 12)
262 if log_file:
263 build_fail_tab.attach(open_log_button, 14, 23, 9, 12)
264 build_fail_tab.attach(file_bug_button, attach_pos, attach_pos + 9, 9, 12)
265
266 else:
267 restart_build = HobButton("Restart the build")
268 restart_build.set_tooltip_text("Restart the build")
269 restart_build.connect('clicked', self.restart_build_button_clicked_cb)
270
271 build_fail_tab.attach(restart_build, 4, 13, 9, 12)
272 build_fail_tab.attach(action_button, 14, 23, 9, 12)
273 if log_file:
274 build_fail_tab.attach(open_log_button, attach_pos, attach_pos + 9, 9, 12)
275
276 self.builder.disk_full = False
255 return build_fail_top 277 return build_fail_top
256 278
257 def show_fail_page(self, title): 279 def show_fail_page(self, title):
@@ -266,6 +288,7 @@ class BuildDetailsPage (HobPage):
266 288
267 self.vbox.pack_start(self.notebook, expand=True, fill=True) 289 self.vbox.pack_start(self.notebook, expand=True, fill=True)
268 self.show_all() 290 self.show_all()
291 self.notebook.set_page("Issues")
269 self.back_button.hide() 292 self.back_button.hide()
270 293
271 def add_build_stop_top_bar(self, action, log_file=None): 294 def add_build_stop_top_bar(self, action, log_file=None):
@@ -396,6 +419,9 @@ class BuildDetailsPage (HobPage):
396 elif "Edit image" in action: 419 elif "Edit image" in action:
397 self.builder.show_configuration() 420 self.builder.show_configuration()
398 421
422 def restart_build_button_clicked_cb(self, button):
423 self.builder.just_bake()
424
399 def stop_primary_action_button_clicked_cb(self, button, action): 425 def stop_primary_action_button_clicked_cb(self, button, action):
400 if "recipes" in action: 426 if "recipes" in action:
401 self.builder.show_recipes() 427 self.builder.show_recipes()