diff options
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r-- | morphlib/buildcommand.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index d6d8dca6..e27581d2 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) |