diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-06-11 18:11:28 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-06-11 18:11:28 +0100 |
commit | 4411f087e0d5c754405e0f57eb4f6918404cae36 (patch) | |
tree | 32895468153540af3a533c0517445a1eb6c0bbeb /morphlib | |
parent | 78cd5671a0a55e332c05967f99014776798f5733 (diff) | |
download | morph-4411f087e0d5c754405e0f57eb4f6918404cae36.tar.gz |
Move installation of artifacts from building them
Cohesion, cohesion, cohesion.
Diffstat (limited to 'morphlib')
-rwxr-xr-x | morphlib/app.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/morphlib/app.py b/morphlib/app.py index 8d10e644..db28d1ce 100755 --- a/morphlib/app.py +++ b/morphlib/app.py @@ -268,14 +268,10 @@ class Morph(cliapp.Application): handle = lac.get(chunk_artifact) staging_area.install_artifact(handle) - def build_group(self, group, needed, install_chunks, to_install, builder, - lac, staging_area): + def build_group(self, group, needed, builder, lac, staging_area): for artifact in group: if artifact in needed: self.msg('Building %s' % artifact.name) - if install_chunks: - self.install_artifacts(staging_area, lac, to_install) - del to_install[:] builder.build_and_cache(artifact) else: self.msg('Using cached %s' % artifact.name) @@ -332,8 +328,10 @@ class Morph(cliapp.Application): to_install = [] for group in order.groups: - self.build_group(group, needed, install_chunks, to_install, - builder, lac, staging_area) + if install_chunks: + self.install_artifacts(staging_area, lac, to_install) + del to_install[:] + self.build_group(group, needed, builder, lac, staging_area) to_install.extend( x for x in group if x.source.morphology['kind'] == 'chunk') |