Skip to contentSkip to conversation

server/process: Always place the server logfile in the build directory

PATCH In review Richard Purdie 2 participants 2 messages Jul 25, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 lib/bb/server/process.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
lib/bb/server/process.py +3 -2
index 828159ed75..9e5e709f04 100644
@@ -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))
Signature · 1 line
2.17.1
#1 lore raw

2018-07-25 15:48 GMT+02:00 Richard Purdie <[email protected]>:

Quoted 3 lines

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.

Thanks, having these files all over the place was quite annoying actually :)

Alex