From d854f1b6dc9d3cfa360a6305798c249f1eefe023 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 25 Jul 2018 13:38:10 +0000 Subject: bitbake: 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. (Bitbake rev: 1620dbc48ffb2a882371cf9174a7b12648befc8a) Signed-off-by: Richard Purdie --- bitbake/lib/bb/server/process.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 828159ed75..9e5e709f04 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/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)) -- cgit v1.2.3-54-g00ecf