aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-25 13:38:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-25 14:47:48 +0100
commit1620dbc48ffb2a882371cf9174a7b12648befc8a (patch)
tree7be68ca87a43acb80802ef1e6c835e019109ec72
parent9876b5da1c65bf09a790542cb4057f2d93868cf7 (diff)
downloadbitbake-contrib-1620dbc48ffb2a882371cf9174a7b12648befc8a.tar.gz
server/process: Always place the server logfile in the build directory
Currently the bitbake-cookerdaemon.log is placed into cwd. This seems like a bad idea, we can place it in the build directory alongside the lockfile that represents the server instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/server/process.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 828159ed7..9e5e709f0 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -377,11 +377,12 @@ class BitBakeServer(object):
if os.path.exists(sockname):
os.unlink(sockname)
+ # Place the log in the builddirectory alongside the lock file
+ logfile = os.path.join(os.path.dirname(self.bitbake_lock.name), "bitbake-cookerdaemon.log")
+
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
# AF_UNIX has path length issues so chdir here to workaround
cwd = os.getcwd()
- logfile = os.path.join(cwd, "bitbake-cookerdaemon.log")
-
try:
os.chdir(os.path.dirname(sockname))
self.sock.bind(os.path.basename(sockname))