diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-01-28 13:18:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-30 15:14:58 +0000 |
commit | afe85485fe185b663a1285b5c27de3160bf06cf7 (patch) | |
tree | 487cdf0fbbd11353094c1f68bc1034b3390dd7e6 /bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |
parent | c58c94824b29665f52ae67ceae3f096930c89fe5 (diff) | |
download | poky-afe85485fe185b663a1285b5c27de3160bf06cf7.tar.gz |
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 <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 7 |
1 files changed, 5 insertions, 2 deletions
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 | |||
2 | from django.db import transaction | 2 | from django.db import transaction |
3 | from orm.models import Build | 3 | from orm.models import Build |
4 | from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException, BuildSetupException | 4 | from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException, BuildSetupException |
5 | from bldcontrol.models import BuildRequest, BuildEnvironment, BRError | 5 | from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable |
6 | import os | 6 | import os |
7 | import logging | 7 | import logging |
8 | 8 | ||
@@ -47,6 +47,9 @@ class Command(NoArgsCommand): | |||
47 | return | 47 | return |
48 | 48 | ||
49 | logger.debug("runbuilds: starting build %s, environment %s" % (br, bec.be)) | 49 | logger.debug("runbuilds: starting build %s, environment %s" % (br, bec.be)) |
50 | |||
51 | # write the build identification variable | ||
52 | BRVariable.objects.create(req = br, name="TOASTER_BRBE", value="%d:%d" % (br.pk, bec.be.pk)) | ||
50 | # let the build request know where it is being executed | 53 | # let the build request know where it is being executed |
51 | br.environment = bec.be | 54 | br.environment = bec.be |
52 | br.save() | 55 | br.save() |
@@ -56,7 +59,7 @@ class Command(NoArgsCommand): | |||
56 | bec.writePreConfFile(br.brvariable_set.all()) | 59 | bec.writePreConfFile(br.brvariable_set.all()) |
57 | 60 | ||
58 | # get the bb server running with the build req id and build env id | 61 | # get the bb server running with the build req id and build env id |
59 | bbctrl = bec.getBBController("%d:%d" % (br.pk, bec.be.pk)) | 62 | bbctrl = bec.getBBController() |
60 | 63 | ||
61 | # trigger the build command | 64 | # trigger the build command |
62 | task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, br.brtarget_set.all())) | 65 | task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, br.brtarget_set.all())) |