From: Colin Walters Date: Mon, 24 Jul 2023 12:52:49 +0000 (-0400) Subject: repo: Clarify when we fail to parse a remote X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2^2~40^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cf525ee6198e20adbc014a86de6199d2f34aec29;p=ostree.git repo: Clarify when we fail to parse a remote This would have directly pointed at the failing config file. --- diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index fc15cb78..46d2c12c 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -2838,8 +2838,9 @@ static gboolean append_one_remote_config (OstreeRepo *self, GFile *path, GCancellable *cancellable, GError **error) { g_autoptr (GKeyFile) remotedata = g_key_file_new (); - if (!g_key_file_load_from_file (remotedata, gs_file_get_path_cached (path), 0, error)) - return FALSE; + const char *pathname = gs_file_get_path_cached (path); + if (!g_key_file_load_from_file (remotedata, pathname, 0, error)) + return glnx_prefix_error (error, "Failed to parse %s", pathname); return add_remotes_from_keyfile (self, remotedata, path, error); } @@ -3245,6 +3246,7 @@ reload_core_config (OstreeRepo *self, GCancellable *cancellable, GError **error) static gboolean reload_remote_config (OstreeRepo *self, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("Reloading remotes", error); g_mutex_lock (&self->remotes_lock); g_hash_table_remove_all (self->remotes);