summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2014-08-13 13:21:53 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2014-08-13 13:21:53 +0000
commit62ab10d8ae25124d82d894cce293a75e5ad1098d (patch)
treedfa61ece758e095b422877ab271b33e7c73fc9b2
parentf7aa084baee522091608b2bfabf9930aab225057 (diff)
downloaddefinitions-62ab10d8ae25124d82d894cce293a75e5ad1098d.tar.gz
Fix stratum error
-rwxr-xr-xscripts/migrate-chunks14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/migrate-chunks b/scripts/migrate-chunks
index 72ae3555..b8ec9664 100755
--- a/scripts/migrate-chunks
+++ b/scripts/migrate-chunks
@@ -115,11 +115,14 @@ def move_chunks(morphs):
print "No spec defined"
def download_chunks(morph):
+ # Create stratum directory where downloading its chunks.
+ stratum_path = 'strata/' + morph['name']
+ subdir = create_directory(stratum_path, definitions_repo)
# Download chunks morphologies defined on the stratum and
# add them to the directory tree.
for chunk in morph['chunks']:
name = chunk['name'] + '.morph'
- chunk['morph'] = sanitise_morphology_path(chunk['morph'],'chunk', morph['name'])
+ chunk['morph'] = sanitise_morphology_path(chunk['morph'], 'chunk', morph['name'])
ref = chunk['ref']
repo = parse_repo_alias(chunk['repo'])
try:
@@ -164,18 +167,17 @@ def download_chunks(morph):
print "Downloading %s from %s into %s" %(name, repo, chunk['morph'])
def move_strata(morphs):
+ # Create strata directory
+ stratum_path = 'strata/'
+ subdir = create_directory(stratum_path, definitions_repo)
for morph in morphs:
- # Add chunk path on the chunk's morph field per stratum
- stratum_path = 'strata/' + morph['name']
- subdir = create_directory(stratum_path, definitions_repo)
-
# Download chunks which belongs to the stratum
download_chunks(morph)
# Add path to the build-depends morphologies
for build_depends in morph['build-depends']:
build_depends['morph'] = sanitise_morphology_path(build_depends['morph'], 'stratum')
- move_file(morph, 'strata/', subdir)
+ move_file(morph, stratum_path, subdir)
# Load all morphologies in the definitions repo
sb = morphlib.sysbranchdir.open_from_within('.')