diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h index 764540a2..4bbf6a06 100644 --- a/src/libostree/ostree-repo-private.h +++ b/src/libostree/ostree-repo-private.h @@ -37,8 +37,6 @@ G_BEGIN_DECLS #define _OSTREE_MAX_OUTSTANDING_FETCHER_REQUESTS 8 #define _OSTREE_MAX_OUTSTANDING_DELTAPART_REQUESTS 2 -#define _OSTREE_DEFAULT_LOCK_TIMEOUT_SECONDS 30 - /* In most cases, writing to disk should be much faster than * fetching from the network, so we shouldn't actually hit * this. But if using pipelining and e.g. pulling over LAN diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 08a6276b..e5ffba91 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -1209,7 +1209,6 @@ ostree_repo_init (OstreeRepo *self) self->objects_dir_fd = -1; self->uncompressed_objects_dir_fd = -1; self->sysroot_kind = OSTREE_REPO_SYSROOT_KIND_UNKNOWN; - self->lock_timeout_seconds = _OSTREE_DEFAULT_LOCK_TIMEOUT_SECONDS; } /** @@ -2734,6 +2733,15 @@ reload_core_config (OstreeRepo *self, self->tmp_expiry_seconds = g_ascii_strtoull (tmp_expiry_seconds, NULL, 10); } + { g_autofree char *lock_timeout_seconds = NULL; + + if (!ot_keyfile_get_value_with_default (self->config, "core", "lock-timeout-secs", "30", + &lock_timeout_seconds, error)) + return FALSE; + + self->lock_timeout_seconds = g_ascii_strtoull (lock_timeout_seconds, NULL, 10); + } + { g_autofree char *compression_level_str = NULL; /* gzip defaults to 6 */