[gnome-software/1252-gnome-software-is-not-able-to-update-org-freedesktop-platform-ffmpeg-full] flatpak: Remember applications to update when replacing by a parent application
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1252-gnome-software-is-not-able-to-update-org-freedesktop-platform-ffmpeg-full] flatpak: Remember applications to update when replacing by a parent application
- Date: Mon, 17 May 2021 17:24:50 +0000 (UTC)
commit 27a11adc3b23d9dbab5cf598fb00d0c1ef0bcc5a
Author: Milan Crha <mcrha redhat com>
Date: Mon May 17 19:21:23 2021 +0200
flatpak: Remember applications to update when replacing by a parent application
Runtimes can be hidden under other runtimes, but calling update on the parent
runtime won't necessarily update also the child runtime, thus remember
the reported ref to be updated by Flatpak and ask to update it together with
the parent runtime.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1252
plugins/flatpak/gs-flatpak.c | 1 +
plugins/flatpak/gs-plugin-flatpak.c | 7 +++++++
2 files changed, 8 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index faf245ca6..fabd248d2 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1686,6 +1686,7 @@ get_real_app_for_update (GsFlatpak *self,
"setting the latter's state instead.", gs_app_get_unique_id (app),
gs_app_get_unique_id (main_app));
gs_app_set_state (main_app, GS_APP_STATE_UPDATABLE_LIVE);
+ gs_app_add_related (main_app, app);
}
return main_app;
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index 08eb1f90f..8c8621020 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -483,6 +483,7 @@ _group_apps_by_installation (GsPlugin *plugin,
GsFlatpak *flatpak = gs_plugin_flatpak_get_handler (plugin, app);
if (flatpak != NULL) {
GsAppList *list_tmp = g_hash_table_lookup (applist_by_flatpaks, flatpak);
+ GsAppList *related_list;
if (list_tmp == NULL) {
list_tmp = gs_app_list_new ();
g_hash_table_insert (applist_by_flatpaks,
@@ -490,6 +491,12 @@ _group_apps_by_installation (GsPlugin *plugin,
list_tmp);
}
gs_app_list_add (list_tmp, app);
+
+ related_list = gs_app_get_related (app);
+ for (guint j = 0; j < gs_app_list_length (related_list); j++) {
+ GsApp *rel_app = gs_app_list_index (related_list, j);
+ gs_app_list_add (list_tmp, rel_app);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]