summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/buildinfohelper.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-05-12 15:10:36 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-17 14:43:30 +0100
commitdf0fc2d90884150f896ac87e401c10ce3bb95850 (patch)
treea391ae391b3ff8149e3bd0f97579fb2a58640097 /bitbake/lib/bb/ui/buildinfohelper.py
parent3718f8d90c84a68cb7a87deb32921c1f0ecc3b1b (diff)
downloadpoky-df0fc2d90884150f896ac87e401c10ce3bb95850.tar.gz
bitbake: buildinfohelper: add method to set current build as CANCELLED
This will be used from toasterui to cancel the current command-line build when a keyboard interrupt is captured. [YOCTO #8515] (Bitbake rev: 1486c770327b53bb5e04baa5f3ea26d8154aed63) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/buildinfohelper.py')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index ff4da78cdb..c5368f63be 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1251,6 +1251,16 @@ class BuildInfoHelper(object):
1251 1251
1252 1252
1253 1253
1254 def cancel_cli_build(self):
1255 """
1256 If a build is currently underway, set its state to CANCELLED;
1257 note that this only gets called for command line builds which are
1258 interrupted, so it doesn't touch any BuildRequest objects
1259 """
1260 build = self.internal_state['build']
1261 if build:
1262 build.outcome = Build.CANCELLED
1263 build.save()
1254 1264
1255 def store_dependency_information(self, event): 1265 def store_dependency_information(self, event):
1256 assert '_depgraph' in vars(event) 1266 assert '_depgraph' in vars(event)