From 765331d76fc252d06b70532f869c82f8611e2b48 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 31 Jan 2013 12:22:34 +0000 Subject: 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. --- morphlib/buildcommand.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'morphlib/buildcommand.py') 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) -- cgit v1.2.1