summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-19 16:04:38 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-25 12:54:15 +0100
commit52e0be44e068b53959d9566516486b758be718dc (patch)
tree333bb99a3053dcda5230f78f0eac298eeb93c22e /bitbake/lib
parent95d789598653d5b3c6d948a2d96685c15bda230a (diff)
downloadast2050-yocto-poky-52e0be44e068b53959d9566516486b758be718dc.zip
ast2050-yocto-poky-52e0be44e068b53959d9566516486b758be718dc.tar.gz
ui/hob: if the user clicks Stop a second time only offer 'Force Stop'
Fixes [YOCTO #1264] (Bitbake rev: 117fb14b93086660ce3f853964536920f916e060) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/hob.py38
1 files changed, 26 insertions, 12 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index a8bbd73..8e3e7bc 100644
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -46,6 +46,7 @@ class MainWindow (gtk.Window):
self.files_to_clean = []
self.selected_image = None
self.selected_packages = None
+ self.stopping = False
self.model = taskmodel
self.model.connect("tasklist-populated", self.update_model)
@@ -403,6 +404,7 @@ class MainWindow (gtk.Window):
self.nb.set_current_page(0)
def build_complete_cb(self, running_build):
+ self.stopping = False
self.back.connect("clicked", self.back_button_clicked_cb)
self.back.set_sensitive(True)
self.cancel.set_sensitive(False)
@@ -651,20 +653,32 @@ class MainWindow (gtk.Window):
return vbox
def cancel_build(self, button):
- lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this build?\n"
- lbl = lbl + "'Force Stop' will stop the build as quickly as"
- lbl = lbl + " possible but may well leave your build directory in an"
- lbl = lbl + " unusable state that requires manual steps to fix.\n"
- lbl = lbl + "'Stop' will stop the build as soon as all in"
- lbl = lbl + " progress build tasks are finished. However if a"
- lbl = lbl + " lengthy compilation phase is in progress this may take"
- lbl = lbl + " some time."
- dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
- dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
- dialog.add_button("Stop", gtk.RESPONSE_OK)
- dialog.add_button("Force Stop", gtk.RESPONSE_YES)
+ if self.stopping:
+ lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
+ lbl = lbl + " would you like to 'Force Stop' the build?\n\n"
+ lbl = lbl + "This will stop the build as quickly as possible but may"
+ lbl = lbl + " well leave your build directory in an unusable state"
+ lbl = lbl + " that requires manual steps to fix.\n"
+ dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
+ dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
+ dialog.add_button("Force Stop", gtk.RESPONSE_YES)
+ else:
+ lbl = "<b>Stop build?</b>\n\nAre you sure you want to stop this"
+ lbl = lbl + " build?\n\n'Force Stop' will stop the build as quickly as"
+ lbl = lbl + " possible but may well leave your build directory in an"
+ lbl = lbl + " unusable state that requires manual steps to fix.\n\n"
+ lbl = lbl + "'Stop' will stop the build as soon as all in"
+ lbl = lbl + " progress build tasks are finished. However if a"
+ lbl = lbl + " lengthy compilation phase is in progress this may take"
+ lbl = lbl + " some time."
+ dialog = CrumbsDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
+ dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
+ dialog.add_button("Stop", gtk.RESPONSE_OK)
+ dialog.add_button("Force Stop", gtk.RESPONSE_YES)
response = dialog.run()
dialog.destroy()
+ if response != gtk.RESPONSE_CANCEL:
+ self.stopping = True
if response == gtk.RESPONSE_OK:
self.handler.cancel_build()
elif response == gtk.RESPONSE_YES:
OpenPOWER on IntegriCloud