diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2012-09-20 16:28:49 +0000 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2012-09-21 15:00:08 +0100 |
commit | fc12ac37b5479f160d10b661943b70d646d68b08 (patch) | |
tree | cf21596ee884a6ec927753e98a0f6a776a20eb60 /morphlib/buildcommand.py | |
parent | 4169d564760ed2ea1acc88e89293ea6a46ec6bb8 (diff) | |
download | morph-fc12ac37b5479f160d10b661943b70d646d68b08.tar.gz |
Always cache artifacts locally and report filenames during build.
The artifact being built is often subsequently hard to find since the user has
to go digging around in their artifact cache to try and determine which
artifact is the one they want.
With this change, the filepath to the artifact will be displayed after building
it. As a side effect, we also need to always cache artifacts locally in order
to do this, otherwise we'd have to report URLs to the remote artifact cache
instead and that might be less useful overall.
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r-- | morphlib/buildcommand.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index 652bf303..34468f1a 100644 --- a/morphlib/buildcommand.py +++ b/morphlib/buildcommand.py @@ -131,6 +131,7 @@ class BuildCommand(object): self.app.status(msg='The %(kind)s %(name)s is already built', kind=artifact.source.morphology['kind'], name=artifact.name) + self.cache_artifacts_locally([artifact]) else: self.app.status(msg='Building %(kind)s %(name)s', kind=artifact.source.morphology['kind'], @@ -149,6 +150,12 @@ class BuildCommand(object): self.install_chunk_artifacts(staging_area, (artifact,)) self.remove_staging_area(staging_area) + self.app.status(msg='%(kind)s %(name)s is cached at %(cachepath)s', + kind=artifact.source.morphology['kind'], + name=artifact.name, + cachepath=self.lac.artifact_filename(artifact), + chatty=(artifact.source.morphology['kind'] != + "system")) def is_built(self, artifact): '''Does either cache already have the artifact?''' |