From 353242ae57b7b47f2bba38ea557c73dd9cacf72b Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Tue, 29 May 2012 10:22:10 +0000 Subject: 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. --- morph | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'morph') 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 -- cgit v1.2.1