diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-03-03 11:18:43 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-04-20 14:07:41 +0000 |
commit | 0a89403deb8e5c746e4f2d0d3d8962c5b638c6b0 (patch) | |
tree | f32904d9bafeeda62f340b549fdcfe0d95ac034f | |
parent | dabac83a6a5e5deaa34922e13e137129c1660fe8 (diff) | |
download | morph-0a89403deb8e5c746e4f2d0d3d8962c5b638c6b0.tar.gz |
Make morph use OSTreeArtifactCache instead of LocalArtifactCache
Change-Id: I957e0b085e9aed3426b164b18e8b50fe47aa918f
-rw-r--r-- | morphlib/buildcommand.py | 3 | ||||
-rw-r--r-- | morphlib/util.py | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index d7c445df..180aa2a6 100644 --- a/morphlib/buildcommand.py +++ b/morphlib/buildcommand.py @@ -74,7 +74,8 @@ class BuildCommand(object): This includes creating the directories on disk if they are missing. ''' - return morphlib.util.new_artifact_caches(self.app.settings) + return morphlib.util.new_artifact_caches( + self.app.settings, status_cb=self.app.status) def new_repo_caches(self): return morphlib.util.new_repo_caches(self.app) diff --git a/morphlib/util.py b/morphlib/util.py index 904dc355..91880988 100644 --- a/morphlib/util.py +++ b/morphlib/util.py @@ -120,7 +120,7 @@ def get_git_resolve_cache_server(settings): # pragma: no cover return None -def new_artifact_caches(settings): # pragma: no cover +def new_artifact_caches(settings, status_cb=None): # pragma: no cover '''Create new objects for local and remote artifact caches. This includes creating the directories on disk, if missing. @@ -132,8 +132,9 @@ def new_artifact_caches(settings): # pragma: no cover if not os.path.exists(artifact_cachedir): os.mkdir(artifact_cachedir) - lac = morphlib.localartifactcache.LocalArtifactCache( - fs.osfs.OSFS(artifact_cachedir)) + mode = settings['ostree-repo-mode'] + lac = morphlib.ostreeartifactcache.OSTreeArtifactCache( + artifact_cachedir, mode=mode, status_cb=status_cb) rac_url = get_artifact_cache_server(settings) rac = None |