summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-06-14 15:50:03 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-06-14 15:50:03 +0000
commitf33553534538be564461d57f81a63ffa4ca6fd54 (patch)
treee4ee5eddf112cbe1ee317b4e6c40248e95b33f6d /scripts
parent8762b87aad701e2f038bf2a0fc5016fd6a632c64 (diff)
downloadmorph-f33553534538be564461d57f81a63ffa4ca6fd54.tar.gz
tests: fix missing baserock meta files
This adds the ability to do this to the script, and fixes use of the script to add the new parameter.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/assemble-stratum5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/assemble-stratum b/scripts/assemble-stratum
index fa4a0390..1fe9bd12 100755
--- a/scripts/assemble-stratum
+++ b/scripts/assemble-stratum
@@ -39,6 +39,7 @@ class AssembleStratum(cliapp.Application):
if self.settings['tarformat'] != "":
tarformat += self.settings['tarformat']
outfile = tarfile.open(args[1], tarformat)
+ # concatenate chunk tarballs
for chunk in chunklist:
path = os.path.join(self.settings['cachedir'], 'artifacts', chunk)
chunktar = tarfile.open(path, mode='r:*')
@@ -48,6 +49,10 @@ class AssembleStratum(cliapp.Application):
else:
outfile.addfile(tarinfo)
chunktar.close()
+ # add the stratum's metadata
+ if os.path.exists(args[0] + '.meta'):
+ outfile.add(args[0] + '.meta',
+ os.path.join('baserock', '%s.meta' % args[2]))
outfile.close()
AssembleStratum().run()