summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-06-28 16:10:39 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-06-28 18:48:56 +0100
commite673826fbab90b1bb3b1b93277cab0e489fec190 (patch)
treeb4a9d24f37ea7cd56f4a1f069b6bb25c62a06ace /morphlib
parent414516fbbc8e961ea6336597bfa8fc3d528fb327 (diff)
downloadmorph-e673826fbab90b1bb3b1b93277cab0e489fec190.tar.gz
Add check for missing build depends in strata
This will make a build fail if the morphology is missing explicit build dependencies. Also fix test causes so that ./check passes.
Diffstat (limited to 'morphlib')
-rwxr-xr-xmorphlib/app.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index 851ee058..fb0ddbaf 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -458,7 +458,18 @@ class Morph(cliapp.Application):
def _create_source_pool(self, lrc, rrc, triplet):
pool = morphlib.sourcepool.SourcePool()
+
+ def check_stratum(filename, morphology):
+ for source in morphology['sources']:
+ if source.get('build-depends', None) is None:
+ name = source.get('name', source.get('repo', 'unknown'))
+ raise morphlib.Error('Add build dependencies to '
+ 'stratum %s for %s' %
+ (filename, name))
+
def add_to_pool(reponame, ref, filename, absref, morphology):
+ if morphology['kind'] == 'stratum':
+ check_stratum(filename, morphology)
source = morphlib.source.Source(reponame, ref, absref,
morphology, filename)
pool.add(source)