Commit 55bf52ac authored by Sjoerd Simons's avatar Sjoerd Simons

Follow TMPDIR environment variable

For usage in CI (among other things) it can be rather usefull to direct
the build-snapshot temporary directory location to e.g. the jobs
workspace such that the central /tmp can't be filled up.

fddcef0a reverted an earlier version of this patch, claiming there
were issues with the older mktemp from the mktemp package. In reality
the initial patch was actually wrong, using --tmpdir= instead of
--tmpdir. The latter works correctly with both versions of mktemp
Signed-off-by: Sjoerd Simons's avatarSjoerd Simons <sjoerd.simons@collabora.co.uk>
parent b76771fa
......@@ -178,8 +178,8 @@ class SnapshotBuilder:
def main(self):
"""Main function: build the snapshot.
"""
tmpdir = self.capture(['mktemp', '-d',
'/tmp/build-snapshot.XXXXXXXXXX']).strip('\n')
tmpdir = self.capture(['mktemp', '-d', '--tmpdir',
'build-snapshot.XXXXXXXXXX']).strip('\n')
self.srcdir = tmpdir + '/s'
if self.args.builder == 'localhost':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment