[bitbake-devel] [PATCH 1/3] buildinfohelper: add method to set current build as CANCELLED
Michael Wood
michael.g.wood at intel.com
Thu May 12 14:10:36 UTC 2016
From: Elliot Smith <elliot.smith at intel.com>
This will be used from toasterui to cancel the current command-line
build when a keyboard interrupt is captured.
[YOCTO #8515]
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
lib/bb/ui/buildinfohelper.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index ff4da78..c5368f6 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/lib/bb/ui/buildinfohelper.py
@@ -1251,6 +1251,16 @@ class BuildInfoHelper(object):
+ def cancel_cli_build(self):
+ """
+ If a build is currently underway, set its state to CANCELLED;
+ note that this only gets called for command line builds which are
+ interrupted, so it doesn't touch any BuildRequest objects
+ """
+ build = self.internal_state['build']
+ if build:
+ build.outcome = Build.CANCELLED
+ build.save()
def store_dependency_information(self, event):
assert '_depgraph' in vars(event)
--
2.7.4
More information about the bitbake-devel
mailing list