lib: Add ostree_repo_reload_config()

For a long time we've cached the remote configs in the repo, which
mostly makes sense for the `repo/config` file, but less sense
for `/etc/ostree/remotes.d`, because we want to support admins
interactively editing them.

One can delete the repo instance and create a new one, but that's a bit ugly.
Let's introduce an API for this so rpm-ostree can reload remotes after
admins/scripts edit them in `/etc`.  We also might as well reload
any other entries in the config.

Structurually now, `ostree_repo_open()` deals with file descriptors, and then
calls `ostree_repo_reload_config()`. Except for the uncompressed cache, which is
the only thing that deals with FDs that can be configured. But we want to delete
that anyways.

No tests, since...we don't have a daemon in this codebase, don't want to shave
that yak just today.

Closes: #662
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-02-07 16:12:58 +00:00
1 parent 200887c7c9
commit 9c0af41710
4 files changed
+147 -105

No files matched your search

+1
View File
@@ -276,6 +276,7 @@ ostree_repo_remote_get_gpg_verify_summary
ostree_repo_remote_gpg_import
ostree_repo_remote_fetch_summary
ostree_repo_remote_fetch_summary_with_options
ostree_repo_reload_config
ostree_repo_get_remote_boolean_option
ostree_repo_get_remote_list_option
ostree_repo_get_remote_option