From b2b8d7b903fb146409be9d62391c64b83b3d7c88 Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Fri, 10 Feb 2012 10:28:44 +0000 Subject: Add --tempdir option, allow to set the tempdir for building. This will not affect or overwrite TMPDIR, so all other parts of morph and Python (like the multiprocessing library) will still use TMPDIR (e.g. /tmp) for temporary files and directories. --- morph | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'morph') diff --git a/morph b/morph index 66e90a3b..7e2372c2 100755 --- a/morph +++ b/morph @@ -43,6 +43,9 @@ class Morph(cliapp.Application): self.settings.string(['cachedir'], 'put build results in DIR (default: %default)', metavar='DIR', default='.') + self.settings.string(['tempdir'], + 'temporary to use for builds', + metavar='DIR', default='/tmp') self.settings.boolean(['no-ccache'], 'do not use ccache') self.settings.boolean(['no-distcc'], 'do not use distcc') self.settings.integer(['max-jobs'], @@ -91,7 +94,7 @@ class Morph(cliapp.Application): ''' - tempdir = morphlib.tempdir.Tempdir() + tempdir = morphlib.tempdir.Tempdir(self.settings['tempdir']) morph_loader = MorphologyLoader(self.settings) source_manager = morphlib.sourcemanager.SourceManager(self) builder = morphlib.builder.Builder(tempdir, self, morph_loader, @@ -239,7 +242,7 @@ class Morph(cliapp.Application): staging area. ''' - tempdir = morphlib.tempdir.Tempdir() + tempdir = morphlib.tempdir.Tempdir(self.settings['tempdir']) morph_loader = MorphologyLoader(self.settings) source_manager = morphlib.sourcemanager.SourceManager(self, update=False) @@ -329,7 +332,7 @@ class Morph(cliapp.Application): ''' - tempdir = morphlib.tempdir.Tempdir() + tempdir = morphlib.tempdir.Tempdir(self.settings['tempdir']) morph_loader = MorphologyLoader(self.settings) source_manager = morphlib.sourcemanager.SourceManager(self) -- cgit v1.2.1