summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-04-20 13:15:07 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-04-20 13:15:07 +0100
commitc84b5c726509c07c3a1803121cb21046a7987ac7 (patch)
tree2af4ddd583fcc9b26af331e19bf9bf5781e65ce2 /morph
parent49768355cffe2c566bf04082d86e651d059bd697 (diff)
downloadmorph-c84b5c726509c07c3a1803121cb21046a7987ac7.tar.gz
Only install chunk artifacts when we should
Diffstat (limited to 'morph')
-rwxr-xr-xmorph29
1 files changed, 19 insertions, 10 deletions
diff --git a/morph b/morph
index f6eade89..00653b8f 100755
--- a/morph
+++ b/morph
@@ -211,13 +211,19 @@ class Morph(cliapp.Application):
if not self.settings['no-git-update']:
artifact.source.repo.update()
- if (self.settings['bootstrap'] or
- not self.settings['staging-chroot']):
+ if self.settings['bootstrap']:
staging_root = '/'
staging_temp = tempfile.mkdtemp()
- else:
+ install_chunks = True
+ elif self.settings['staging-chroot']:
staging_root = tempfile.mkdtemp()
staging_temp = staging_root
+ install_chunks = True
+ else:
+ staging_root = '/'
+ staging_temp = tempfile.mkdtemp()
+ install_chunks = False
+
staging_area = morphlib.stagingarea.StagingArea(staging_root,
staging_temp)
@@ -231,13 +237,16 @@ class Morph(cliapp.Application):
builder.build_and_cache(artifact)
else:
logging.debug('No need to build %s' % artifact.name)
- # install chunks only
- chunk_artifacts = [x
- for x in group
- if x.source.morphology['kind'] == 'chunk']
- for artifact in chunk_artifacts:
- handle = lac.get(artifact)
- staging_area.install_artifact(handle)
+
+ if install_chunks:
+ # install chunks only
+ chunk_artifacts = [x
+ for x in group
+ if x.source.morphology['kind'] ==
+ 'chunk']
+ for artifact in chunk_artifacts:
+ handle = lac.get(artifact)
+ staging_area.install_artifact(handle)
if staging_root != '/':
staging_area.remove()