[gnome-software/wip/jrocha/fix-runtime-extensions-update] fixup! flatpak: Use "list of related apps for install" when updating an app



commit 2e8bd2ab4690a400876f0ac68731bd978b7b98ab
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Fri Jan 26 20:51:09 2018 +0100

    fixup! flatpak: Use "list of related apps for install" when updating an app

 plugins/flatpak/gs-flatpak.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index b72d3f76..cc497d77 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -2580,6 +2580,7 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
        g_autoptr(GPtrArray) xrefs_installed = NULL;
        g_autoptr(GHashTable) hash_installed = NULL;
        g_autoptr(GsAppList) list = gs_app_list_new ();
+       g_autofree gchar *app_ref = NULL;
 
        /* get the list of installed apps */
        xrefs_installed = flatpak_installation_list_installed_refs (self->installation,
@@ -2668,8 +2669,10 @@ gs_flatpak_get_list_for_install_or_update (GsFlatpak *self,
                gs_app_list_add (list, app_tmp);
        }
 
-       /* add the original app last unless it's a proxy app */
-       if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY))
+       /* add the original app last unless it's already installed or is a proxy app */
+       app_ref = gs_flatpak_app_get_ref_display (app);
+       if (!gs_app_has_quirk (app, AS_APP_QUIRK_IS_PROXY) &&
+           !g_hash_table_contains (hash_installed, app_ref))
                gs_app_list_add (list, app);
 
        return g_steal_pointer (&list);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]