diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-02-19 17:45:42 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-02-21 11:46:08 +0000 |
commit | ed79cb01302fbfda0484c7371e5a364d0d872e74 (patch) | |
tree | aa8305318f36ee291d982b1c48449cbe354ee17e /morphlib/buildcommand.py | |
parent | 29b8977ac03ac9ce0c178ce6febd0a5f27288001 (diff) | |
download | morph-ed79cb01302fbfda0484c7371e5a364d0d872e74.tar.gz |
Make BuildCommand report current and total build steps
This adds a [Build 1/12765] to the output of the building of each
artifact. This makes it easier to see how much work there might
still be remaining.
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r-- | morphlib/buildcommand.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index 27fec4da..d6d8dca6 100644 --- a/morphlib/buildcommand.py +++ b/morphlib/buildcommand.py @@ -51,7 +51,7 @@ class BuildCommand(object): artifact = self.get_artifact_object(repo_name, ref, filename) self.build_in_order(artifact) - self.app.status(msg='Build ends successfully', chatty=True) + self.app.status(msg='Build ends successfully') def new_build_env(self): '''Create a new BuildEnvironment instance.''' @@ -181,8 +181,13 @@ class BuildCommand(object): self.app.status(msg='Building according to build ordering', chatty=True) - for a in artifact.walk(): + artifacts = artifact.walk() + old_prefix = self.app.status_prefix + for i, a in enumerate(artifacts): + self.app.status_prefix = ( + old_prefix + '[Build %d/%d] ' % ((i+1), len(artifacts))) self.build_artifact(a) + self.app.status_prefix = old_prefix def build_artifact(self, artifact): '''Build one artifact. |