summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-03-03 11:18:43 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-14 16:32:57 +0000
commit2786ca120468ee2f0a708a46e6d76361c181db51 (patch)
treedfc8425c2f29d3a2c8cd42bddf60fe9ea1fc6c9a
parent4b1e5e3a6fdfe0da98e12e34a8715d1311e1e65d (diff)
downloadmorph-2786ca120468ee2f0a708a46e6d76361c181db51.tar.gz
Make morph use OSTreeArtifactCache instead of LocalArtifactCache
Change-Id: I957e0b085e9aed3426b164b18e8b50fe47aa918f
-rw-r--r--morphlib/buildcommand.py3
-rw-r--r--morphlib/util.py7
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