summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-05-29 10:22:10 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-05-30 10:13:47 +0100
commit353242ae57b7b47f2bba38ea557c73dd9cacf72b (patch)
treecfad0e84e03960031e913d19fb4a4faa38c34709 /morph
parentc89c565299851461b414629cdcc9a717c2d391bb (diff)
downloadmorph-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.
Diffstat (limited to 'morph')
-rwxr-xr-xmorph8
1 files changed, 4 insertions, 4 deletions
diff --git a/morph b/morph
index d06aac47..7f5969bb 100755
--- a/morph
+++ b/morph
@@ -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