diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-14 11:26:10 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-17 12:09:24 +0000 |
commit | c853e4aa39c978054c037d1e7061e939427d495c (patch) | |
tree | 5cd306f27e2789e886269501638e9e80b6f0ed79 /morphlib/app.py | |
parent | f19efa182d0e53d97e163f980d6e221c55dd9c9b (diff) | |
download | morph-c853e4aa39c978054c037d1e7061e939427d495c.tar.gz |
Fix default setting for compiler cache dir; update tests
Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
Diffstat (limited to 'morphlib/app.py')
-rwxr-xr-x | morphlib/app.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/morphlib/app.py b/morphlib/app.py index a13d26a1..9239bf31 100755 --- a/morphlib/app.py +++ b/morphlib/app.py @@ -60,10 +60,10 @@ class Morph(cliapp.Application): metavar='DIR', default=defaults['cachedir']) self.settings.string(['compiler-cache-dir'], - 'cache compiled objects in CCDIR/REPO_NAME', - metavar='CCDIR', - default=os.path.join(self.settings['cachedir'], - 'ccache')) + 'cache compiled objects in DIR/REPO. If not ' + 'provided, defaults to CACHEDIR/ccache/', + metavar='DIR', + default=None) self.settings.string(['build-ref-prefix'], 'Prefix to use for temporary build refs', metavar='PREFIX', @@ -186,6 +186,9 @@ class Morph(cliapp.Application): if self.settings['tarball-server'] is None: self.settings['tarball-server'] = 'http://%s/tarballs/' % ( self.settings['trove-host']) + if self.settings['compiler-cache-dir'] is None: + self.settings['compiler-cache-dir'] = os.path.join( + self.settings['cachedir'], 'ccache') if 'MORPH_DUMP_PROCESSED_CONFIG' in os.environ: self.settings.dump_config(sys.stdout) sys.exit(0) |