From 5b7f918f66df140ff38a9955f841c8aeeab6089d Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Wed, 2 May 2012 10:57:55 +0000 Subject: Use dedicated /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. --- morph | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'morph') 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'], -- cgit v1.2.1