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

+2 -2
View File
@@ -376,9 +376,9 @@ global:
* NOTE NOTE NOTE
*/
LIBOSTREE_2017.XX {
LIBOSTREE_2017.2 {
global:
someostree_symbol_deleteme;
ostree_repo_reload_config;
} LIBOSTREE_2017.1;
/* Stub section for the stable release *after* this development one; don't