[ostree] repo: Only load /etc/ostree/remotes.d for system repo
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] repo: Only load /etc/ostree/remotes.d for system repo
- Date: Tue, 27 May 2014 01:50:13 +0000 (UTC)
commit a4d01976bb9722476b035abc87aa023bba2c7691
Author: Colin Walters <walters verbum org>
Date: Mon May 26 18:36:03 2014 -0400
repo: Only load /etc/ostree/remotes.d for system repo
They shouldn't be loaded for random test/personal repositories. Doing
so triggers another bug in that we return them from
ostree_repo_get_config() when then causes clients to write them out
permanently to disk with ostree_repo_write_config(). This caused test
suite failures.
src/libostree/ostree-repo.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 41ba5f8..210ce36 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -682,8 +682,15 @@ ostree_repo_open (OstreeRepo *self,
TRUE, &self->enable_uncompressed_cache, error))
goto out;
- if (!append_remotes_d (self, cancellable, error))
- goto out;
+ {
+ gs_unref_object GFile *default_repo_path = get_default_repo_path ();
+
+ if (g_file_equal (self->repodir, default_repo_path))
+ {
+ if (!append_remotes_d (self, cancellable, error))
+ goto out;
+ }
+ }
if (!gs_file_open_dir_fd (self->objects_dir, &self->objects_dir_fd, cancellable, error))
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]