[gnome-software/gnome-42: 1/2] gs-page: Propagate job error into the UI for an app update
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-42: 1/2] gs-page: Propagate job error into the UI for an app update
- Date: Mon, 20 Jun 2022 12:33:02 +0000 (UTC)
commit 8aaba27749eba4d5feb625678cbfc8b90d35d776
Author: Milan Crha <mcrha redhat com>
Date: Thu Jun 16 10:58:32 2022 +0200
gs-page: Propagate job error into the UI for an app update
Not doing so can lead to a failed update and a notification to restart
the machine to get the update in action, which is not correct.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1786
src/gs-page.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/gs-page.c b/src/gs-page.c
index 4ba414b3d..e13acdc35 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -319,6 +319,7 @@ gs_page_update_app_response_cb (GtkDialog *dialog,
g_debug ("update %s", gs_app_get_id (helper->app));
plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_UPDATE,
"interactive", TRUE,
+ "propagate-error", helper->propagate_error,
"app", helper->app,
NULL);
gs_plugin_loader_job_process_async (priv->plugin_loader,
@@ -402,6 +403,7 @@ gs_page_update_app (GsPage *page, GsApp *app, GCancellable *cancellable)
helper->app = g_object_ref (app);
helper->page = g_object_ref (page);
helper->cancellable = g_object_ref (cancellable);
+ helper->propagate_error = TRUE;
/* tell the user what they have to do */
if (gs_app_get_kind (app) == AS_COMPONENT_KIND_FIRMWARE &&
@@ -416,6 +418,7 @@ gs_page_update_app (GsPage *page, GsApp *app, GCancellable *cancellable)
/* generic fallback */
plugin_job = gs_plugin_job_newv (helper->action,
"interactive", TRUE,
+ "propagate-error", helper->propagate_error,
"app", app,
NULL);
gs_plugin_loader_job_process_async (priv->plugin_loader, plugin_job,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]