]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
toasterui: capture keyboard interrupts the same way as knotty
authorElliot Smith <elliot.smith@intel.com>
Thu, 12 May 2016 14:10:37 +0000 (15:10 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 May 2016 13:42:56 +0000 (14:42 +0100)
commitd39d2edca95900da433074ee95a192d7bfe7090d
treeb1adb5bcb2a477ef55cc58d506b693ecd52a4b2a
parent1486c770327b53bb5e04baa5f3ea26d8154aed63
toasterui: capture keyboard interrupts the same way as knotty

knotty captures two levels of keyboard interrupt: a single interrupt
or two interrupts in a row. These then trigger stateShutdown
and stateForceShutdown respectively.

toasterui doesn't have an equivalent way of capturing interrupts and
using them to shut down bitbake. Now that we are no longer using
knotty + XMLRPCServer for our command line builds (since switching to
per-project build directories), we see some odd side effects of this,
such as builds continuing after they have been interrupted on the
command line.

Bring toasterui in line with knotty (copy-paste most of the code
in knotty.py which deals with interrupts) so that a keyboard
interrupt actually shuts down the bitbake server (if not in
observe only mode).

Additionally use the cancel_cli_build() method to set the Build
status to CANCELLED in Toaster's db when we get keyboard interrupts.
This means that builds interrupted on the command line show as
cancelled (same as if they'd been cancelled from the Toaster UI),
as specified in the UI designs.

[YOCTO #8515]

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>
lib/bb/ui/toasterui.py