summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-05 13:31:13 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2013-06-05 16:59:29 +0000
commitb4a633a5229b6c3380cde0cc67da037ea8091008 (patch)
treec5f61a51eedbf5600ac9bcaa0249ce422ead7e6e /morphlib/builder2.py
parent86cbc1bc8ef84dc9496d7723a15dec9b43eacb73 (diff)
downloadmorph-b4a633a5229b6c3380cde0cc67da037ea8091008.tar.gz
Change the structure of the temporary directory used by morph
Now, inside the temporary directory we will have the following subdirectories: chunks, staging, failed and deployments. The failed directory will contain the staging areas of failed builds.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r--morphlib/builder2.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index 59c62222..459094f4 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -314,6 +314,10 @@ class ChunkBuilder(BuilderBase):
for line in f:
logging.error('OUTPUT FROM FAILED BUILD: %s' %
line.rstrip('\n'))
+ src_dir = self.staging_area.dirname
+ dest_dir = os.path.join(self.app.settings['tempdir'],
+ 'failed')
+ cliapp.runcmd(['mv', src_dir, dest_dir])
raise
self.staging_area.chroot_close()
built_artifacts = self.assemble_chunk_artifacts(destdir)