summaryrefslogtreecommitdiff
path: root/morphlib/plugins/branch_and_merge_plugin.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-06-04 16:22:47 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-06-05 13:12:46 +0000
commit05c366e2ea93d1f7739054bf723d9e3441245733 (patch)
treea4029aa9ff4b4eb44b37be8aeadda96d33a53f29 /morphlib/plugins/branch_and_merge_plugin.py
parente4ec4af6a2056bb5912aabac453d8e0c58d8a38e (diff)
downloadmorph-05c366e2ea93d1f7739054bf723d9e3441245733.tar.gz
S7904: Add disk space checks before build & deploy
The same check that cachedir and tempdir are large enough is used for both build and build-morphology. Deploy only checks for tempdir being large enough.
Diffstat (limited to 'morphlib/plugins/branch_and_merge_plugin.py')
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index 215ac6c8..38e9ccc3 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -1527,6 +1527,13 @@ class BranchAndMergePlugin(cliapp.Plugin):
raise cliapp.AppException('morph build expects exactly one '
'parameter: the system to build')
+ # Raise an exception if there is not enough space
+ morphlib.util.check_disk_available(
+ self.app.settings['tempdir'],
+ self.app.settings['tempdir-min-space'],
+ self.app.settings['cachedir'],
+ self.app.settings['cachedir-min-space'])
+
system_name = args[0]
# Deduce workspace and system branch and branch root repository.