summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-05-02 10:57:55 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-05-03 12:51:24 +0000
commit5b7f918f66df140ff38a9955f841c8aeeab6089d (patch)
tree1deff981f67277913c7ecf440de931e908b5e12b /morph
parentdc7f4153ae6f74fe747117154e02a2198be6e8c2 (diff)
downloadmorph-5b7f918f66df140ff38a9955f841c8aeeab6089d.tar.gz
Use dedicated <cachedir>/artficats directory for local artifact cache.
Make sure that this directory is actually created before trying to save artifacts to it. Also adjust all tests to use this new directory for looking up artifacts.
Diffstat (limited to 'morph')
-rwxr-xr-xmorph10
1 files changed, 8 insertions, 2 deletions
diff --git a/morph b/morph
index 5bdaa650..2988d3b4 100755
--- a/morph
+++ b/morph
@@ -179,9 +179,14 @@ class Morph(cliapp.Application):
if not os.path.exists(cachedir):
os.mkdir(cachedir)
+ artifact_cachedir = os.path.join(self.settings['cachedir'], 'artifacts')
+ if not os.path.exists(artifact_cachedir):
+ os.mkdir(artifact_cachedir)
+
build_env = morphlib.buildenvironment.BuildEnvironment(self.settings)
ckc = morphlib.cachekeycomputer.CacheKeyComputer(build_env)
- lac = morphlib.localartifactcache.LocalArtifactCache(cachedir)
+ lac = morphlib.localartifactcache.LocalArtifactCache(
+ os.path.join(cachedir, 'artifacts'))
lrc = morphlib.localrepocache.LocalRepoCache(
os.path.join(cachedir, 'gits'),
self.settings['git-base-url'],
@@ -449,7 +454,8 @@ class Morph(cliapp.Application):
cachedir = self.settings['cachedir']
build_env = morphlib.buildenvironment.BuildEnvironment(self.settings)
ckc = morphlib.cachekeycomputer.CacheKeyComputer(build_env)
- lac = morphlib.localartifactcache.LocalArtifactCache(cachedir)
+ lac = morphlib.localartifactcache.LocalArtifactCache(
+ os.path.join(cachedir, 'artifacts'))
lrc = morphlib.localrepocache.LocalRepoCache(
os.path.join(cachedir, 'gits'),
self.settings['git-base-url'],