summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol')
-rw-r--r--bitbake/lib/toaster/bldcontrol/localhostbecontroller.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index 374991bfdb..1bd51437a6 100644
--- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -82,6 +82,8 @@ class LocalhostBEController(BuildEnvironmentController):
82 assert self.pokydirname and os.path.exists(self.pokydirname) 82 assert self.pokydirname and os.path.exists(self.pokydirname)
83 self._createdirpath(self.be.builddir) 83 self._createdirpath(self.be.builddir)
84 self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, self.be.builddir)) 84 self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, self.be.builddir))
85 # delete the templateconf.cfg; it may come from an unsupported layer configuration
86 os.remove(os.path.join(self.be.builddir, "conf/templateconf.cfg"))
85 87
86 88
87 def writeConfFile(self, file_name, variable_list = None, raw = None): 89 def writeConfFile(self, file_name, variable_list = None, raw = None):
@@ -115,9 +117,10 @@ class LocalhostBEController(BuildEnvironmentController):
115 f.seek(0, 2) # jump to the end 117 f.seek(0, 2) # jump to the end
116 toaster_ui_log_filelength = f.tell() 118 toaster_ui_log_filelength = f.tell()
117 119
118 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, 120 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,
119 self.dburl, self.be.builddir, own_bitbake) 121 self.dburl, self.be.builddir, own_bitbake)
120 port = "-1" 122 port = "-1"
123 logger.debug("localhostbecontroller: starting builder \n%s\n" % cmd)
121 cmdoutput = self._shellcmd(cmd) 124 cmdoutput = self._shellcmd(cmd)
122 for i in cmdoutput.split("\n"): 125 for i in cmdoutput.split("\n"):
123 if i.startswith("Bitbake server address"): 126 if i.startswith("Bitbake server address"):
@@ -136,7 +139,7 @@ class LocalhostBEController(BuildEnvironmentController):
136 139
137 retries = 0 140 retries = 0
138 started = False 141 started = False
139 while not started and retries < 30: 142 while not started and retries < 10:
140 started = _toaster_ui_started(toaster_ui_log_filepath, toaster_ui_log_filelength) 143 started = _toaster_ui_started(toaster_ui_log_filepath, toaster_ui_log_filelength)
141 import time 144 import time
142 logger.debug("localhostbecontroller: Waiting bitbake server to start") 145 logger.debug("localhostbecontroller: Waiting bitbake server to start")
@@ -144,7 +147,8 @@ class LocalhostBEController(BuildEnvironmentController):
144 retries += 1 147 retries += 1
145 148
146 if not started: 149 if not started:
147 raise BuildSetupException("localhostbecontroller: Bitbake server did not start in 15 seconds, aborting (Error: '%s')" % (cmdoutput)) 150 toaster_server_log = open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read()
151 raise BuildSetupException("localhostbecontroller: Bitbake server did not start in 5 seconds, aborting (Error: '%s' '%s')" % (cmdoutput, toaster_server_log))
148 152
149 logger.debug("localhostbecontroller: Started bitbake server") 153 logger.debug("localhostbecontroller: Started bitbake server")
150 154
@@ -180,7 +184,7 @@ class LocalhostBEController(BuildEnvironmentController):
180 base = components[-2] if components[-1] == "git" else components[-1] 184 base = components[-2] if components[-1] == "git" else components[-1]
181 185
182 if branch != "HEAD": 186 if branch != "HEAD":
183 return os.path.join(self.be.sourcedir, "_%s_%s.toaster_cloned" % (base, branch)) 187 return "_%s_%s.toaster_cloned" % (base, branch)
184 188
185 189
186 # word of attention; this is a localhost-specific issue; only on the localhost we expect to have "HEAD" releases 190 # 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):
239 243
240 # 3. checkout the repositories 244 # 3. checkout the repositories
241 for giturl, commit in gitrepos.keys(): 245 for giturl, commit in gitrepos.keys():
242 localdirname = self.getGitCloneDirectory(giturl, commit) 246 localdirname = os.path.join(self.be.sourcedir, self.getGitCloneDirectory(giturl, commit))
243 logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" % (giturl, commit, localdirname)) 247 logger.debug("localhostbecontroller: giturl %s:%s checking out in current directory %s" % (giturl, commit, localdirname))
244 248
245 # make sure our directory is a git repository 249 # make sure our directory is a git repository