repo: Disable uncompressed object cache on non-writable repos
While we did support disabling the uncompressed-objects-cache per-repository: 1) We didn't actually respect that operation when doing CHECKOUT_MODE_USER on archive-z2 repositories 2) It'd be better to automatically detect we can't write to the repo and disable the uncompressed cache then.
This commit is contained in:
1 parent
d546abfa2a
commit
884a9b27e9
3 files changed
+16
-12
No files matched your search
@@ -392,7 +392,8 @@ checkout_one_file_at (OstreeRepo *repo,
|
||||
gboolean is_bare = (current_repo->mode == OSTREE_REPO_MODE_BARE
|
||||
&& mode == OSTREE_REPO_CHECKOUT_MODE_NONE);
|
||||
gboolean is_archive_z2_with_cache = (current_repo->mode == OSTREE_REPO_MODE_ARCHIVE_Z2
|
||||
&& mode == OSTREE_REPO_CHECKOUT_MODE_USER);
|
||||
&& mode == OSTREE_REPO_CHECKOUT_MODE_USER
|
||||
&& current_repo->enable_uncompressed_cache);
|
||||
|
||||
/* But only under these conditions */
|
||||
if (is_bare || is_archive_z2_with_cache)
|
||||
|
||||
Reference in new issue
Block a user