diff options
author | Rob Bradford <rob@linux.intel.com> | 2008-10-28 11:09:51 +0000 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2008-10-28 11:40:03 +0000 |
commit | 0b9da42bb5c2355fe6b2a71f3a4970ac46118caa (patch) | |
tree | 8e62f6a148f4d61ff6c9e6cca084a5de572076a1 | |
parent | 23f08fdde338f95966842fc53c16e98a8418bbb7 (diff) | |
download | poky-0b9da42bb5c2355fe6b2a71f3a4970ac46118caa.tar.gz |
bitbake-dev: Save the cooker log into the working directory.
This is necessary since with later refactoring the TMPDIR variable will not be
available at this point in time.
-rwxr-xr-x | bitbake-dev/bin/bitbake | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/bitbake-dev/bin/bitbake b/bitbake-dev/bin/bitbake index d85135a117..3e8782597a 100755 --- a/bitbake-dev/bin/bitbake +++ b/bitbake-dev/bin/bitbake | |||
@@ -130,17 +130,13 @@ Default BBFILES are the .bb files in the current directory.""" ) | |||
130 | # of the UIs (e.g. for DISPLAY, etc.) | 130 | # of the UIs (e.g. for DISPLAY, etc.) |
131 | bb.utils.clean_environment() | 131 | bb.utils.clean_environment() |
132 | 132 | ||
133 | cooker.parseConfiguration() | 133 | cooker.parseCommandLine() |
134 | host = cooker.server.host | 134 | host = cooker.server.host |
135 | port = cooker.server.port | 135 | port = cooker.server.port |
136 | 136 | ||
137 | # Save a logfile for cooker somewhere | 137 | # Save a logfile for cooker into the current working directory. When the |
138 | t = bb.data.getVar('TMPDIR', cooker.configuration.data, True) | 138 | # server is daemonized this logfile will be truncated. |
139 | if not t: | 139 | cooker_logfile = os.path.join (os.getcwd(), "cooker.log") |
140 | bb.msg.fatal(bb.msg.domain.Build, "TMPDIR not set") | ||
141 | t = os.path.join(t, "cooker") | ||
142 | bb.mkdirhier(t) | ||
143 | cooker_logfile = "%s/log.cooker.%s" % (t, str(os.getpid())) | ||
144 | 140 | ||
145 | daemonize.createDaemon(cooker.serve, cooker_logfile) | 141 | daemonize.createDaemon(cooker.serve, cooker_logfile) |
146 | del cooker | 142 | del cooker |