diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-04 16:22:47 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-05 13:12:46 +0000 |
commit | 05c366e2ea93d1f7739054bf723d9e3441245733 (patch) | |
tree | a4029aa9ff4b4eb44b37be8aeadda96d33a53f29 /morphlib/plugins/build_plugin.py | |
parent | e4ec4af6a2056bb5912aabac453d8e0c58d8a38e (diff) | |
download | morph-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/build_plugin.py')
-rw-r--r-- | morphlib/plugins/build_plugin.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/morphlib/plugins/build_plugin.py b/morphlib/plugins/build_plugin.py index 6583a6a8..128187cf 100644 --- a/morphlib/plugins/build_plugin.py +++ b/morphlib/plugins/build_plugin.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012,2013 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,6 +36,13 @@ class BuildPlugin(cliapp.Plugin): ''' + # 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']) + build_command = morphlib.buildcommand.BuildCommand(self.app) build_command = self.app.hookmgr.call('new-build-command', build_command) |