summaryrefslogtreecommitdiffstats
path: root/lib/bb/event.py
diff options
context:
space:
mode:
authorKang Kai <kai.kang@windriver.com>2012-07-27 16:38:02 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-02 15:25:39 +0100
commit0a0fca3d94a1db6458ae21501a66461a334410ed (patch)
tree8303c05ba1f5376232d94b9d4253f885e31600d6 /lib/bb/event.py
parente49a656a499355a5c6e7eb00bf5b8f1795e8dddb (diff)
downloadbitbake-contrib-0a0fca3d94a1db6458ae21501a66461a334410ed.tar.gz
monitordisk: fire event DISKFULL when terminate build
Part of [Yocto #2168] Add a event DiskFull to descript the termination by disk monitor. Update check() to fire the event DiskFull when terminates the build. This could help UIs to deal this scenario and show more information to end user. Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r--lib/bb/event.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 1116c0a7b..20923b5f0 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -312,6 +312,14 @@ class BuildCompleted(BuildBase, OperationCompleted):
OperationCompleted.__init__(self, total, "Building Failed")
BuildBase.__init__(self, n, p, failures)
+class DiskFull(Event):
+ """Disk full case build aborted"""
+ def __init__(self, dev, type, freespace, mountpoint):
+ Event.__init__(self)
+ self._dev = dev
+ self._type = type
+ self._free = freespace
+ self._mountpoint = mountpoint
class NoProvider(Event):
"""No Provider for an Event"""