diff options
-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 |