mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-04 16:10:04 +00:00
bitbake: toaster: display bitbake output after process start
If the bitbake server exists after the initial process start, the only output displayed shows proper server start, with no debug info. This patch also brings the server log into the error message, so the user has better info about what's going on. (Bitbake rev: 6b46f436296683f7a2f72ac978ef30d0a38ad7a4) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
5b22f15557
commit
ede212b2dd
|
|
@ -82,6 +82,8 @@ class LocalhostBEController(BuildEnvironmentController):
|
|||
assert self.pokydirname and os.path.exists(self.pokydirname)
|
||||
self._createdirpath(self.be.builddir)
|
||||
self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, self.be.builddir))
|
||||
# delete the templateconf.cfg; it may come from an unsupported layer configuration
|
||||
os.remove(os.path.join(self.be.builddir, "conf/templateconf.cfg"))
|
||||
|
||||
|
||||
def writeConfFile(self, file_name, variable_list = None, raw = None):
|
||||
|
|
@ -115,9 +117,10 @@ class LocalhostBEController(BuildEnvironmentController):
|
|||
f.seek(0, 2) # jump to the end
|
||||
toaster_ui_log_filelength = f.tell()
|
||||
|
||||
cmd = "bash -c \"source %s/oe-init-build-env %s && bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 >toaster_server.log && DATABASE_URL=%s BBSERVER=0.0.0.0:-1 daemon -d -i -D %s -o toaster_ui.log -- %s --observe-only -u toasterui &\"" % (self.pokydirname, self.be.builddir,
|
||||
cmd = "bash -c \"source %s/oe-init-build-env %s 2>&1 >toaster_server.log && bitbake --read conf/toaster-pre.conf --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 2>&1 >toaster_server.log && DATABASE_URL=%s BBSERVER=0.0.0.0:-1 daemon -d -i -D %s -o toaster_ui.log -- %s --observe-only -u toasterui &\"" % (self.pokydirname, self.be.builddir,
|
||||
self.dburl, self.be.builddir, own_bitbake)
|
||||
port = "-1"
|
||||
logger.debug("localhostbecontroller: starting builder \n%s\n" % cmd)
|
||||
cmdoutput = self._shellcmd(cmd)
|
||||
for i in cmdoutput.split("\n"):
|
||||
if i.startswith("Bitbake server address"):
|
||||
|
|
@ -136,7 +139,7 @@ class LocalhostBEController(BuildEnvironmentController):
|
|||
|
||||
retries = 0
|
||||
started = False
|
||||
while not started and retries < 30:
|
||||
while not started and retries < 10:
|
||||
started = _toaster_ui_started(toaster_ui_log_filepath, toaster_ui_log_filelength)
|
||||
import time
|
||||
logger.debug("localhostbecontroller: Waiting bitbake server to start")
|
||||
|
|
@ -144,7 +147,8 @@ class LocalhostBEController(BuildEnvironmentController):
|
|||
retries += 1
|
||||
|
||||
if not started:
|
||||
raise BuildSetupException("localhostbecontroller: Bitbake server did not start in 15 seconds, aborting (Error: '%s')" % (cmdoutput))
|
||||
toaster_server_log = open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read()
|
||||
raise BuildSetupException("localhostbecontroller: Bitbake server did not start in 5 seconds, aborting (Error: '%s' '%s')" % (cmdoutput, toaster_server_log))
|
||||
|
||||
logger.debug("localhostbecontroller: Started bitbake server")
|
||||
|
||||
|
|
@ -180,7 +184,7 @@ class LocalhostBEController(BuildEnvironmentController):
|
|||
base = components[-2] if components[-1] == "git" else components[-1]
|
||||
|
||||
if branch != "HEAD":
|
||||
return os.path.join(self.be.sourcedir, "_%s_%s.toaster_cloned" % (base, branch))
|
||||
return "_%s_%s.toaster_cloned" % (base, branch)
|
||||
|
||||
|
||||
# word of attention; this is a localhost-specific issue; only on the localhost we expect to have "HEAD" releases
|
||||
|
|
@ -239,7 +243,7 @@ class LocalhostBEController(BuildEnvironmentController):
|
|||
|
||||
# 3. checkout the repositories
|
||||
for giturl, commit in gitrepos.keys():
|
||||
localdirname = self.getGitCloneDirectory(giturl, commit)
|
||||
localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit))
|
||||
logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" % (giturl, commit, localdirname))
|
||||
|
||||
# make sure our directory is a git repository
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class ToasterSetting(models.Model):
|
|||
value = models.CharField(max_length=255)
|
||||
|
||||
def __unicode__(self):
|
||||
return "Setting %s" % self.name
|
||||
return "Setting %s = " % (self.name, self.value)
|
||||
|
||||
class ProjectManager(models.Manager):
|
||||
def create_project(self, name, release):
|
||||
|
|
@ -100,7 +100,7 @@ class Project(models.Model):
|
|||
objects = ProjectManager()
|
||||
|
||||
def __unicode__(self):
|
||||
return "%s (%s, %s)" % (self.name, self.release, self.bitbake_version)
|
||||
return "%s (Release %s, BBV %s)" % (self.name, self.release, self.bitbake_version)
|
||||
|
||||
def get_current_machine_name(self):
|
||||
try:
|
||||
|
|
@ -896,7 +896,7 @@ class BitbakeVersion(models.Model):
|
|||
dirpath = models.CharField(max_length=255)
|
||||
|
||||
def __unicode__(self):
|
||||
return "%s (%s)" % (self.name, self.branch)
|
||||
return "%s (Branch: %s)" % (self.name, self.branch)
|
||||
|
||||
|
||||
class Release(models.Model):
|
||||
|
|
@ -1055,8 +1055,10 @@ class Layer_Version(models.Model):
|
|||
|
||||
# raise Exception(candidate_layer_versions)
|
||||
|
||||
release_priorities = map(lambda x: (x.layer_source_id, x.priority), project.release.releaselayersourcepriority_set.all().order_by("-priority"))
|
||||
release_priorities = {}
|
||||
|
||||
for ls_id, prio in map(lambda x: (x.layer_source_id, x.priority), project.release.releaselayersourcepriority_set.all().order_by("-priority")):
|
||||
release_priorities[ls_id] = prio
|
||||
|
||||
def _get_ls_priority(ls):
|
||||
# if there is no layer source, we have minus infinite priority, as we don't want this layer selected
|
||||
|
|
@ -1081,7 +1083,7 @@ class Layer_Version(models.Model):
|
|||
raise Exception("Cannot determine the vcs_reference for layer version %s" % vars(self))
|
||||
|
||||
def __unicode__(self):
|
||||
return str(self.layer) + "(%s,%s)" % (self.get_vcs_reference(), self.build.project if self.build is not None else "None")
|
||||
return "%d %s (VCS %s, Project %s)" % (self.pk, str(self.layer), self.get_vcs_reference(), self.build.project if self.build is not None else "No project")
|
||||
|
||||
class Meta:
|
||||
unique_together = ("layer_source", "up_id")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user