summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-01-31 12:22:34 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-20 16:52:15 +0000
commit765331d76fc252d06b70532f869c82f8611e2b48 (patch)
tree283238f3b340bdd27368f30881b48114d0321b73 /morphlib
parent2ce8a926e858c06f76c7875dbd28616613f541dc (diff)
downloadmorph-765331d76fc252d06b70532f869c82f8611e2b48.tar.gz
buildcommand: Refuse to build chunks or strata out of context
Building invididual chunks is bad because we have no idea what build mode to use. Building individual strata would work, but all of the stratum's build dependencies would need to be built first so there would be little time saved in any case. There is also no way to test them beyond checking that the build was successful.
Diffstat (limited to 'morphlib')
-rw-r--r--morphlib/buildcommand.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index 27fec4da..b9ded140 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -80,7 +80,12 @@ class BuildCommand(object):
self.app.status(msg='Creating source pool', chatty=True)
srcpool = self.app.create_source_pool(
self.lrc, self.rrc, (repo_name, ref, filename))
-
+
+ root_kind = srcpool.lookup(repo_name, ref, filename).morphology['kind']
+ if root_kind != 'system':
+ raise morphlib.Error(
+ 'Building a %s directly is not supported' % root_kind)
+
self.app.status(
msg='Validating cross-morphology references', chatty=True)
self._validate_cross_morphology_references(srcpool)