summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-06-30 11:28:31 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-06-30 11:28:31 +0000
commitf4727faa9490fe878132facebff1f6622f0817ad (patch)
treeb732dc56031c5bbf01a994be7c9f9f76aeff4431
parentc7396b45d6bdc564d329d8660763464e75b72495 (diff)
downloadmorph-f4727faa9490fe878132facebff1f6622f0817ad.tar.gz
If a path is given then check for a chunk in definitions
-rw-r--r--morphlib/app.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index e7385e7a..ffd60945 100644
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -382,12 +382,15 @@ class Morph(cliapp.Application):
morphlib.util.sanitise_morphology_path(s['morph']))
for s in morphology['build-depends'])
for c in morphology['chunks']:
- if 'morph' not in c:
- reponame = c['repo']
- ref = c['ref']
+ if c['morph'] == c['name']:
+ chunk_morph_location = c['repo']
+ chunk_morph_ref = c['ref']
+ else:
+ chunk_morph_location = reponame
+ chunk_morph_ref = ref
queue.append(
- (reponame,
- ref,
+ (chunk_morph_location,
+ chunk_morph_ref,
morphlib.util.sanitise_morphology_path(c['morph'])))
def cache_repo_and_submodules(self, cache, url, ref, done):