Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-ups for repo-finders config option #1763

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apidoc/ostree-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ ostree_repo_get_mode
ostree_repo_get_min_free_space_bytes
ostree_repo_get_config
ostree_repo_get_dfd
ostree_repo_get_repo_finders
ostree_repo_get_default_repo_finders
ostree_repo_hash
ostree_repo_equal
ostree_repo_copy_config
Expand Down
2 changes: 1 addition & 1 deletion man/ostree.repo-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Boston, MA 02111-1307, USA.
</varlistentry>

<varlistentry>
<term><varname>repo-finders</varname></term>
<term><varname>default-repo-finders</varname></term>
<listitem><para>Semicolon separated default list of finders (sources
for refs) to use when pulling. This can be used to disable
pulling from mounted filesystems, peers on the local network,
Expand Down
2 changes: 1 addition & 1 deletion src/libostree/libostree-devel.sym
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
LIBOSTREE_2018.9 {
ostree_mutable_tree_remove;
ostree_repo_get_min_free_space_bytes;
ostree_repo_get_repo_finders;
ostree_repo_get_default_repo_finders;
} LIBOSTREE_2018.7;

/* Stub section for the stable release *after* this development one; don't
Expand Down
1 change: 1 addition & 0 deletions src/libostree/ostree-repo-pull.c
Original file line number Diff line number Diff line change
Expand Up @@ -5020,6 +5020,7 @@ ostree_repo_find_remotes_async (OstreeRepo *self,
}
#endif /* HAVE_AVAHI */

/* self->repo_finders is guaranteed to be non-empty */
g_assert (default_finders != NULL);
finders = default_finders;

Expand Down
12 changes: 6 additions & 6 deletions src/libostree/ostree-repo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2942,7 +2942,7 @@ reload_core_config (OstreeRepo *self,
{ g_auto(GStrv) configured_finders = NULL;
g_autoptr(GError) local_error = NULL;

configured_finders = g_key_file_get_string_list (self->config, "core", "repo-finders",
configured_finders = g_key_file_get_string_list (self->config, "core", "default-repo-finders",
NULL, &local_error);
if (g_error_matches (local_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))
g_clear_error (&local_error);
Expand All @@ -2953,7 +2953,7 @@ reload_core_config (OstreeRepo *self,
}

if (configured_finders != NULL && *configured_finders == NULL)
return glnx_throw (error, "Invalid empty repo-finders configuration");
return glnx_throw (error, "Invalid empty default-repo-finders configuration");

for (char **iter = configured_finders; iter && *iter; iter++)
{
Expand Down Expand Up @@ -5952,18 +5952,18 @@ ostree_repo_set_collection_id (OstreeRepo *self,
}

/**
* ostree_repo_get_repo_finders:
* ostree_repo_get_default_repo_finders:
* @self: an #OstreeRepo
*
* Get the set of repo finders configured. See the documentation for
* the "core.repo-finders" config key.
* Get the set of default repo finders configured. See the documentation for
* the "core.default-repo-finders" config key.
*
* Returns: (array zero-terminated=1) (element-type utf8):
* %NULL-terminated array of strings.
* Since: 2018.9
*/
const gchar * const *
ostree_repo_get_repo_finders (OstreeRepo *self)
ostree_repo_get_default_repo_finders (OstreeRepo *self)
{
g_return_val_if_fail (OSTREE_IS_REPO (self), NULL);

Expand Down
2 changes: 1 addition & 1 deletion src/libostree/ostree-repo.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ gboolean ostree_repo_set_collection_id (OstreeRepo *self,
GError **error);

_OSTREE_PUBLIC
const gchar * const * ostree_repo_get_repo_finders (OstreeRepo *self);
const gchar * const * ostree_repo_get_default_repo_finders (OstreeRepo *self);

_OSTREE_PUBLIC
GFile * ostree_repo_get_path (OstreeRepo *self);
Expand Down