diff options
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())) |