From afe85485fe185b663a1285b5c27de3160bf06cf7 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 28 Jan 2015 13:18:09 +0000 Subject: bitbake: toaster: new layer checkout logic This patch implements a new layer checkout logic that brings more flexibility in getting layers under different commits work with Toaster. The new hibrid logic will checkout separately each layer and commit id; the task execution will be delegated to the checkedout bitbake, but the data logger will be executed from the current toaster version as to bring in enough data to sustain the updates in UI models. [YOCTO #7171] [YOCTO #6892] (Bitbake rev: c6eb0f7f16c59530c2525b2e5629fe86de4e8f0f) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py') diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index bdce6ee902..23ee855558 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py @@ -2,7 +2,7 @@ from django.core.management.base import NoArgsCommand, CommandError from django.db import transaction from orm.models import Build from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException, BuildSetupException -from bldcontrol.models import BuildRequest, BuildEnvironment, BRError +from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable import os import logging @@ -47,6 +47,9 @@ class Command(NoArgsCommand): return logger.debug("runbuilds: starting build %s, environment %s" % (br, bec.be)) + + # write the build identification variable + BRVariable.objects.create(req = br, name="TOASTER_BRBE", value="%d:%d" % (br.pk, bec.be.pk)) # let the build request know where it is being executed br.environment = bec.be br.save() @@ -56,7 +59,7 @@ class Command(NoArgsCommand): bec.writePreConfFile(br.brvariable_set.all()) # get the bb server running with the build req id and build env id - bbctrl = bec.getBBController("%d:%d" % (br.pk, bec.be.pk)) + bbctrl = bec.getBBController() # trigger the build command task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, br.brtarget_set.all())) -- cgit v1.2.3-54-g00ecf