diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-05-29 10:22:10 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-05-30 10:13:47 +0100 |
commit | 353242ae57b7b47f2bba38ea557c73dd9cacf72b (patch) | |
tree | cfad0e84e03960031e913d19fb4a4faa38c34709 | |
parent | c89c565299851461b414629cdcc9a717c2d391bb (diff) | |
download | morph-353242ae57b7b47f2bba38ea557c73dd9cacf72b.tar.gz |
morph: use dir=tempdir when making tempdirs
This should fix it using TMPDIR for its directories.
This currently doesn't pass the test, because the test is too strict,
nothing must use the TMPDIR in the environment, but sub-programs
currently do, which causes things to fail.
-rwxr-xr-x | morph | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -260,17 +260,17 @@ class Morph(cliapp.Application): if self.settings['bootstrap']: staging_root = '/' - staging_temp = tempfile.mkdtemp() + staging_temp = tempfile.mkdtemp(dir=self.settings['tempdir']) install_chunks = True setup_proc = False elif self.settings['staging-chroot']: - staging_root = tempfile.mkdtemp() + staging_root = tempfile.mkdtemp(dir=self.settings['tempdir']) staging_temp = staging_root install_chunks = True setup_proc = True else: staging_root = '/' - staging_temp = tempfile.mkdtemp() + staging_temp = tempfile.mkdtemp(dir=self.settings['tempdir']) install_chunks = False setup_proc = False @@ -531,7 +531,7 @@ class Morph(cliapp.Application): def setup(path): part = morphlib.fsutils.setup_device_mapping(ex, path) - mount_point = tempfile.mkdtemp() + mount_point = tempfile.mkdtemp(dir=self.settings['tempdir']) morphlib.fsutils.mount(ex, part, mount_point) return mount_point |