From b2a959a0ce039b7630c0ea537d772df647c75663 Mon Sep 17 00:00:00 2001 From: Kang Kai Date: Fri, 27 Jul 2012 16:38:02 +0800 Subject: bitbake: 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. (Bitbake rev: 0a0fca3d94a1db6458ae21501a66461a334410ed) Signed-off-by: Kang Kai Signed-off-by: Richard Purdie --- bitbake/lib/bb/event.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bitbake/lib/bb/event.py') diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 1116c0a7bf..20923b5f08 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/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""" -- cgit v1.2.3-54-g00ecf