diff options
-rwxr-xr-x | bitbake/bin/toaster | 5 | ||||
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | 12 |
2 files changed, 9 insertions, 8 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster index f5ee68ca25..18eba8ea07 100755 --- a/bitbake/bin/toaster +++ b/bitbake/bin/toaster | |||
@@ -183,11 +183,6 @@ if [ `basename \"$0\"` = `basename \"${SRCFILE}\"` ]; then | |||
183 | exit 1 | 183 | exit 1 |
184 | fi | 184 | fi |
185 | 185 | ||
186 | if ! which daemon >/dev/null 2>&1; then | ||
187 | echo -e "Failed dependency; toaster needs the 'daemon' program in order to be able to start builds'. Please install the 'daemon' program from your distribution repositories or http://www.libslack.org/daemon/" 1>&2 | ||
188 | exit 1 | ||
189 | fi | ||
190 | |||
191 | # Define a fake builddir where only the pid files are actually created. No real builds will take place here. | 186 | # Define a fake builddir where only the pid files are actually created. No real builds will take place here. |
192 | BUILDDIR=/tmp/toaster_$$ | 187 | BUILDDIR=/tmp/toaster_$$ |
193 | if [ -d "$BUILDDIR" ]; then | 188 | if [ -d "$BUILDDIR" ]; then |
diff --git a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py index 95ba481974..dfe06f9473 100644 --- a/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py | |||
@@ -117,10 +117,11 @@ class LocalhostBEController(BuildEnvironmentController): | |||
117 | f.seek(0, 2) # jump to the end | 117 | f.seek(0, 2) # jump to the end |
118 | toaster_ui_log_filelength = f.tell() | 118 | toaster_ui_log_filelength = f.tell() |
119 | 119 | ||
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, | 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 \"" % (self.pokydirname, self.be.builddir) |
121 | self.dburl, self.be.builddir, own_bitbake) | 121 | |
122 | port = "-1" | 122 | port = "-1" |
123 | logger.debug("localhostbecontroller: starting builder \n%s\n" % cmd) | 123 | logger.debug("localhostbecontroller: starting builder \n%s\n" % cmd) |
124 | |||
124 | cmdoutput = self._shellcmd(cmd) | 125 | cmdoutput = self._shellcmd(cmd) |
125 | with open(self.be.builddir + "/toaster_server.log", "r") as f: | 126 | with open(self.be.builddir + "/toaster_server.log", "r") as f: |
126 | for i in f.readlines(): | 127 | for i in f.readlines(): |
@@ -128,6 +129,10 @@ class LocalhostBEController(BuildEnvironmentController): | |||
128 | port = i.split(" ")[-1] | 129 | port = i.split(" ")[-1] |
129 | logger.debug("localhostbecontroller: Found bitbake server port %s" % port) | 130 | logger.debug("localhostbecontroller: Found bitbake server port %s" % port) |
130 | 131 | ||
132 | cmd = "bash -c \"source %s/oe-init-build-env-memres -1 %s && DATABASE_URL=%s %s --observe-only -u toasterui --remote-server=0.0.0.0:-1 -t xmlrpc\"" % (self.pokydirname, self.be.builddir, self.dburl, own_bitbake) | ||
133 | with open(toaster_ui_log_filepath, "a+") as f: | ||
134 | p = subprocess.Popen(cmd, cwd = self.be.builddir, shell=True, stdout=f, stderr=f) | ||
135 | |||
131 | def _toaster_ui_started(filepath, filepos = 0): | 136 | def _toaster_ui_started(filepath, filepos = 0): |
132 | if not os.path.exists(filepath): | 137 | if not os.path.exists(filepath): |
133 | return False | 138 | return False |
@@ -148,8 +153,9 @@ class LocalhostBEController(BuildEnvironmentController): | |||
148 | retries += 1 | 153 | retries += 1 |
149 | 154 | ||
150 | if not started: | 155 | if not started: |
156 | toaster_ui_log = open(os.path.join(self.be.builddir, "toaster_ui.log"), "r").read() | ||
151 | toaster_server_log = open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read() | 157 | toaster_server_log = open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read() |
152 | raise BuildSetupException("localhostbecontroller: Bitbake server did not start in 5 seconds, aborting (Error: '%s' '%s')" % (cmdoutput, toaster_server_log)) | 158 | raise BuildSetupException("localhostbecontroller: Bitbake server did not start in 5 seconds, aborting (Error: '%s' '%s')" % (toaster_ui_log, toaster_server_log)) |
153 | 159 | ||
154 | logger.debug("localhostbecontroller: Started bitbake server") | 160 | logger.debug("localhostbecontroller: Started bitbake server") |
155 | 161 | ||