summaryrefslogtreecommitdiff
path: root/morphlib/buildcommand.py
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-05-07 17:12:56 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-05-12 13:18:22 +0000
commiteda5cb29d0200ee55c0ed50d2afe1a17dbd7577a (patch)
tree277ad825b27568bc801ee7353eadfed7a7d75369 /morphlib/buildcommand.py
parenteb9e43d4ffe992cd66945a7d7fa2feb00ee49473 (diff)
downloadmorph-eda5cb29d0200ee55c0ed50d2afe1a17dbd7577a.tar.gz
Explain how to cancel a distbuild
Cancelling a distbuild with ctrl+c no longer cancels the build itself. This commit adds some output explaining what should be done to cancel the build as well as the local process. This commit also fixes a bug where the BuildStarted event would be sent each time a chunk finished building, since it was being sent in _queue_worker_builds. This is fixed by adding a new function to be called when the build graph annotation is complete which sends BuildStarted and then calls _queue_worker_builds, which no longer sends the BuildStarted event. Change-Id: I26ddea2c9080887f449e87004411ddffe4e583b7
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r--morphlib/buildcommand.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index 6a5373ab..c5d86a08 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -572,4 +572,9 @@ class InitiatorBuildCommand(BuildCommand):
# Python exceptions.
logging.info('Received KeyboardInterrupt, aborting.')
for initiator in loop.state_machines_of_type(distbuild.Initiator):
+ connection_id = initiator.connection_id or 'ID'
+ self.app.status(msg='Stopping initiator process. To cancel '
+ 'the build use `morph distbuild-cancel '
+ '%(initiator_connection)s`.',
+ initiator_connection=connection_id)
initiator.handle_cancel()