[gnome-software/1878-failure-to-get-updates-in-one-plugin-skips-other-plugins] rpm-ostree: Ignore errors when getting updates
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1878-failure-to-get-updates-in-one-plugin-skips-other-plugins] rpm-ostree: Ignore errors when getting updates
- Date: Fri, 26 Aug 2022 14:25:58 +0000 (UTC)
commit 85b2948903d8a51187f9e1f63ae9976d18a16087
Author: Milan Crha <mcrha redhat com>
Date: Fri Aug 26 15:30:37 2022 +0200
rpm-ostree: Ignore errors when getting updates
Do not pass errors to the caller, only print them into the verbose log,
to not block updates from the other plugins.
Helps https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1878
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index a3b5eecd3..6984ff95b 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -1255,17 +1255,20 @@ gs_plugin_add_updates (GsPlugin *plugin,
g_autoptr(GVariant) rpm_diff = NULL;
g_autoptr(GsRPMOSTreeOS) os_proxy = NULL;
g_autoptr(GsRPMOSTreeSysroot) sysroot_proxy = NULL;
+ g_autoptr(GError) local_error = NULL;
const gchar *checksum = NULL;
const gchar *version = NULL;
g_auto(GVariantDict) cached_update_dict;
- if (!gs_rpmostree_ref_proxies (self, &os_proxy, &sysroot_proxy, cancellable, error))
- return FALSE;
+ if (!gs_rpmostree_ref_proxies (self, &os_proxy, &sysroot_proxy, cancellable, &local_error)) {
+ g_debug ("Failed to ref proxies to get updates: %s", local_error->message);
+ return TRUE;
+ }
/* ensure D-Bus properties are updated before reading them */
- if (!gs_rpmostree_sysroot_call_reload_sync (sysroot_proxy, cancellable, error)) {
- gs_rpmostree_error_convert (error);
- return FALSE;
+ if (!gs_rpmostree_sysroot_call_reload_sync (sysroot_proxy, cancellable, &local_error)) {
+ g_debug ("Failed to call reload to get updates: %s", local_error->message);
+ return TRUE;
}
cached_update = gs_rpmostree_os_dup_cached_update (os_proxy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]