diff options
-rw-r--r-- | morphlib/morphologyfactory.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/morphlib/morphologyfactory.py b/morphlib/morphologyfactory.py index 8a0b047a..891a2de7 100644 --- a/morphlib/morphologyfactory.py +++ b/morphlib/morphologyfactory.py @@ -63,7 +63,7 @@ class NoStratumBuildDependsError(StratumError): class MorphologyFactory(object): - '''An way of creating morphologies which will provide a default''' + '''A way of creating morphologies which will provide a default''' def __init__(self, local_repo_cache, remote_repo_cache=None, app=None): self._lrc = local_repo_cache @@ -78,22 +78,29 @@ class MorphologyFactory(object): text = None if self._lrc.has_repo(reponame): + self.status(msg="Looking for %s in local repo cache" % filename, + chatty=True) repo = self._lrc.get_repo(reponame) file_list = repo.ls_tree(sha1) if filename in file_list: text = repo.cat(sha1, filename) elif self._rrc is not None: + self.status(msg="Looking for %s in remote repo cache" % filename, + chatty=True) file_list = self._rrc.ls_tree(reponame, sha1) if filename in file_list: - self.status(msg="Retrieving %(reponame)s %(sha1)s %(filename)s" - " from the remote artifact cache.", - reponame=reponame, sha1=sha1, filename=filename, - chatty=True) + self.status(msg='Retrieving %s %s %s' + 'from the remote artifact cache.' + % (reponame, sha1, filename), chatty=True) text = self._rrc.cat_file(reponame, sha1, filename) else: raise NotcachedError(reponame) if text is None: + self.status( + msg="File %s doesn't exist: " + "attempting to infer chunk morph from repo's build system" + % filename, chatty=True) bs = morphlib.buildsystem.detect_build_system(file_list) if bs is None: raise AutodetectError(reponame, sha1, filename) |