From 2786ca120468ee2f0a708a46e6d76361c181db51 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Tue, 3 Mar 2015 11:18:43 +0000 Subject: Make morph use OSTreeArtifactCache instead of LocalArtifactCache Change-Id: I957e0b085e9aed3426b164b18e8b50fe47aa918f --- morphlib/buildcommand.py | 3 ++- 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 -- cgit v1.2.1