diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2018-02-22 12:02:44 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2018-02-22 12:02:44 +0000 |
commit | b2197bc2aa7300ec9663686ce767aa02d78bbb99 (patch) | |
tree | 76cde6640729345e1eeb5c0ce3991b8b2ac2d265 | |
parent | 3d94bd25ddb74ab05a4c9f4785c7f3d8441df23f (diff) | |
download | buildstream-b2197bc2aa7300ec9663686ce767aa02d78bbb99.tar.gz |
_ostree.py: Disable OSTree's minimum disk space check in our repossam/disable-ostree-free-space-check
This interacts badly with our builds, usually if the check does fire
it's at the point that we are trying to commit a completed build (which
may have taken a long time to complete) into the cache. Even though
there might be enough space available to store the build, the error
causes BuildStream to consider it "failed" and forces the user to start
again.
This aims to fix https://gitlab.com/BuildStream/buildstream/issues/216
although there is some evidence that it does not completely do so.
BuildStream currently has no minimum disk space check, and no way
to automatically clean up the cache. There is an open issue for this:
https://gitlab.com/BuildStream/buildstream/issues/135
-rw-r--r-- | buildstream/_ostree.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py index 165556365..e3457dc35 100644 --- a/buildstream/_ostree.py +++ b/buildstream/_ostree.py @@ -52,6 +52,13 @@ def ensure(path, compress): else OSTree.RepoMode.BARE_USER repo.create(mode) + + # Disble OSTree's built in minimum-disk-space check. + config = repo.copy_config() + config.set_string('core', 'min-free-space-percent', '0') + repo.write_config(config) + repo.reload_config() + return repo |