[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2556/8267] bitbake: toaster: notify runbuilds when build status changes
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2556/8267] bitbake: toaster: notify runbuilds when build status changes
- Date: Sat, 16 Dec 2017 23:23:46 +0000 (UTC)
commit e9a12e5d37390632ac6f265f9513106f00ccdbb9
Author: Ed Bartosh <ed bartosh linux intel com>
Date: Fri Sep 16 17:22:30 2016 +0100
bitbake: toaster: notify runbuilds when build status changes
Called signal_runbuilds API when build is scheduled, cancelled or
finished to notify runbuilds process about builds status change.
[YOCTO #8918]
(Bitbake rev: fe08f0fa4b328908e73695ebbceca87bc86a49f9)
Signed-off-by: Ed Bartosh <ed bartosh linux intel com>
Signed-off-by: Michael Wood <michael g wood intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/ui/buildinfohelper.py | 4 ++++
bitbake/lib/toaster/orm/models.py | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 96166dc..c93ee94 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -43,6 +43,7 @@ from orm.models import Package, Package_File, Target_Installed_Package, Target_F
from orm.models import Task_Dependency, Package_Dependency
from orm.models import Recipe_Dependency, Provides
from orm.models import Project, CustomImagePackage, CustomImageRecipe
+from orm.models import signal_runbuilds
from bldcontrol.models import BuildEnvironment, BuildRequest
@@ -234,6 +235,7 @@ class ORMWrapper(object):
build.completed_on = timezone.now()
build.outcome = outcome
build.save()
+ signal_runbuilds()
def update_target_set_license_manifest(self, target, license_manifest_path):
target.license_manifest_path = license_manifest_path
@@ -1354,6 +1356,7 @@ class BuildInfoHelper(object):
self._ensure_build()
self.internal_state['build'].outcome = Build.CANCELLED
self.internal_state['build'].save()
+ signal_runbuilds()
def store_dependency_information(self, event):
assert '_depgraph' in vars(event)
@@ -1540,6 +1543,7 @@ class BuildInfoHelper(object):
else:
br.state = BuildRequest.REQ_FAILED
br.save()
+ signal_runbuilds()
def store_log_error(self, text):
mockevent = MockEvent()
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 38d014a..a7de57c 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -377,6 +377,8 @@ class Project(models.Model):
except ProjectVariable.DoesNotExist:
pass
br.save()
+ signal_runbuilds()
+
except Exception:
# revert the build request creation since we're not done cleanly
br.delete()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]