diff options
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/bbcontroller.py | 4 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 19 | ||||
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 2 |
3 files changed, 18 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/bitbake/lib/toaster/bldcontrol/bbcontroller.py index 912f67bf8c..5195600d90 100644 --- a/bitbake/lib/toaster/bldcontrol/bbcontroller.py +++ b/bitbake/lib/toaster/bldcontrol/bbcontroller.py | |||
@@ -37,8 +37,8 @@ class BitbakeController(object): | |||
37 | """ | 37 | """ |
38 | 38 | ||
39 | def __init__(self, be): | 39 | def __init__(self, be): |
40 | import bb.server.xmlrpc | 40 | import bb.server.xmlrpcclient |
41 | self.connection = bb.server.xmlrpc._create_server(be.bbaddress, | 41 | self.connection = bb.server.xmlrpcclient._create_server(be.bbaddress, |
42 | int(be.bbport))[0] | 42 | int(be.bbport))[0] |
43 | 43 | ||
44 | def _runCommand(self, command): | 44 | def _runCommand(self, command): |
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 291624625b..6142f7e004 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
@@ -24,6 +24,7 @@ import os | |||
24 | import sys | 24 | import sys |
25 | import re | 25 | import re |
26 | import shutil | 26 | import shutil |
27 | import time | ||
27 | from django.db import transaction | 28 | from django.db import transaction |
28 | from django.db.models import Q | 29 | from django.db.models import Q |
29 | from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake | 30 | from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake |
@@ -331,12 +332,22 @@ class LocalhostBEController(BuildEnvironmentController): | |||
331 | bitbake = os.path.join(self.pokydirname, 'bitbake', 'bin', 'bitbake') | 332 | bitbake = os.path.join(self.pokydirname, 'bitbake', 'bin', 'bitbake') |
332 | toasterlayers = os.path.join(builddir,"conf/toaster-bblayers.conf") | 333 | toasterlayers = os.path.join(builddir,"conf/toaster-bblayers.conf") |
333 | self._shellcmd('bash -c \"source %s %s; BITBAKE_UI="knotty" %s --read %s --read %s ' | 334 | self._shellcmd('bash -c \"source %s %s; BITBAKE_UI="knotty" %s --read %s --read %s ' |
334 | '--server-only -t xmlrpc -B 0.0.0.0:0\"' % (oe_init, | 335 | '--server-only -B 0.0.0.0:0\"' % (oe_init, |
335 | builddir, bitbake, confpath, toasterlayers), self.be.sourcedir) | 336 | builddir, bitbake, confpath, toasterlayers), self.be.sourcedir) |
336 | 337 | ||
337 | # read port number from bitbake.lock | 338 | # read port number from bitbake.lock |
338 | self.be.bbport = "" | 339 | self.be.bbport = "" |
339 | bblock = os.path.join(builddir, 'bitbake.lock') | 340 | bblock = os.path.join(builddir, 'bitbake.lock') |
341 | # allow 10 seconds for bb lock file to appear but also be populated | ||
342 | for lock_check in range(10): | ||
343 | if not os.path.exists(bblock): | ||
344 | logger.debug("localhostbecontroller: waiting for bblock file to appear") | ||
345 | time.sleep(1) | ||
346 | continue | ||
347 | if 10 < os.stat(bblock).st_size: | ||
348 | break | ||
349 | logger.debug("localhostbecontroller: waiting for bblock content to appear") | ||
350 | time.sleep(1) | ||
340 | with open(bblock) as fplock: | 351 | with open(bblock) as fplock: |
341 | for line in fplock: | 352 | for line in fplock: |
342 | if ":" in line: | 353 | if ":" in line: |
@@ -365,10 +376,10 @@ class LocalhostBEController(BuildEnvironmentController): | |||
365 | log = os.path.join(builddir, 'toaster_ui.log') | 376 | log = os.path.join(builddir, 'toaster_ui.log') |
366 | local_bitbake = os.path.join(os.path.dirname(os.getenv('BBBASEDIR')), | 377 | local_bitbake = os.path.join(os.path.dirname(os.getenv('BBBASEDIR')), |
367 | 'bitbake') | 378 | 'bitbake') |
368 | self._shellcmd(['bash -c \"(TOASTER_BRBE="%s" BBSERVER="0.0.0.0:-1" ' | 379 | self._shellcmd(['bash -c \"(TOASTER_BRBE="%s" BBSERVER="0.0.0.0:%s" ' |
369 | '%s %s -u toasterui --token="" >>%s 2>&1;' | 380 | '%s %s -u toasterui --token="" >>%s 2>&1;' |
370 | 'BITBAKE_UI="knotty" BBSERVER=0.0.0.0:-1 %s -m)&\"' \ | 381 | 'BITBAKE_UI="knotty" BBSERVER=0.0.0.0:%s %s -m)&\"' \ |
371 | % (brbe, local_bitbake, bbtargets, log, bitbake)], | 382 | % (brbe, self.be.bbport, local_bitbake, bbtargets, log, self.be.bbport, bitbake)], |
372 | builddir, nowait=True) | 383 | builddir, nowait=True) |
373 | 384 | ||
374 | logger.debug('localhostbecontroller: Build launched, exiting. ' | 385 | logger.debug('localhostbecontroller: Build launched, exiting. ' |
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 05cc5a83b1..7aaebedc2d 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -451,7 +451,7 @@ class Build(models.Model): | |||
451 | recipes_to_parse = models.IntegerField(default=1) | 451 | recipes_to_parse = models.IntegerField(default=1) |
452 | 452 | ||
453 | # number of recipes parsed so far for this build | 453 | # number of recipes parsed so far for this build |
454 | recipes_parsed = models.IntegerField(default=0) | 454 | recipes_parsed = models.IntegerField(default=1) |
455 | 455 | ||
456 | # number of repos to clone for this build | 456 | # number of repos to clone for this build |
457 | repos_to_clone = models.IntegerField(default=1) | 457 | repos_to_clone = models.IntegerField(default=1) |