diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-02-13 13:05:22 +0000 |
---|---|---|
committer | Baserock Gerrit <gerrit@baserock.org> | 2016-02-25 18:23:06 +0000 |
commit | c1aa6a47e792cfa61b67eccee401fcb77cd57591 (patch) | |
tree | 5a717423fdf1bb9dea298da713f79d353a080b0b /morphlib/sourceresolver.py | |
parent | fb6dd955cbc7081f47dc43919075dc4eb3809172 (diff) | |
download | morph-c1aa6a47e792cfa61b67eccee401fcb77cd57591.tar.gz |
Warning when different names in strata/chunks
Now is an warning when the name of a chunk in a stratum is different from
the name of the chunk in the chunk file. Example of the warning message:
WARNING: Name 'binutils' doesn't match 'binutils-foo' in morphology: strata/build-essential/binutils.morph
Change-Id: I38f0ccff57fc25db12c572fdc8a01dbd6434f01c
Diffstat (limited to 'morphlib/sourceresolver.py')
-rw-r--r-- | morphlib/sourceresolver.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/sourceresolver.py b/morphlib/sourceresolver.py index d7c9707a..2346d2d6 100644 --- a/morphlib/sourceresolver.py +++ b/morphlib/sourceresolver.py @@ -374,6 +374,10 @@ class SourceResolver(object): morphology = self._get_morphology(resolved_morphologies, definitions_checkout_dir, morph_loader, filename) + + if morphology['name'] != chunk_name: + warnings.warn("Name '%s' doesn't match '%s in morpholgy: %s" + % (morphology['name'], chunk_name, filename)) else: # Chunk uses one of the predefined build systems. In this case # 'filename' will be faked (name of chunk + '.morph'). |