]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake-dev: Save the cooker log into the working directory.
authorRob Bradford <rob@linux.intel.com>
Tue, 28 Oct 2008 11:09:51 +0000 (11:09 +0000)
committerRob Bradford <rob@linux.intel.com>
Tue, 28 Oct 2008 11:40:03 +0000 (11:40 +0000)
This is necessary since with later refactoring the TMPDIR variable will not be
available at this point in time.

bitbake-dev/bin/bitbake

index d85135a11723e62a28af095c665603fabdfadb61..3e8782597a953d69f202ebf082c85eebbe6be3b9 100755 (executable)
@@ -130,17 +130,13 @@ Default BBFILES are the .bb files in the current directory.""" )
     # of the UIs (e.g. for DISPLAY, etc.)
     bb.utils.clean_environment()
 
-    cooker.parseConfiguration()
+    cooker.parseCommandLine()
     host = cooker.server.host
     port = cooker.server.port
 
-    # Save a logfile for cooker somewhere
-    t = bb.data.getVar('TMPDIR', cooker.configuration.data, True)
-    if not t:
-       bb.msg.fatal(bb.msg.domain.Build, "TMPDIR not set")
-    t = os.path.join(t, "cooker")
-    bb.mkdirhier(t)
-    cooker_logfile = "%s/log.cooker.%s" % (t, str(os.getpid()))
+    # Save a logfile for cooker into the current working directory. When the
+    # server is daemonized this logfile will be truncated.
+    cooker_logfile = os.path.join (os.getcwd(), "cooker.log")
 
     daemonize.createDaemon(cooker.serve, cooker_logfile)
     del cooker