[gnome-software/wip/kalev/flatpakref-from-configured-remote] flatpak: Fix installing flatpakrefs if the remote is already configured



commit 80a17dcf9cdcd2179b280e368f812524dafe6bae
Author: Kalev Lember <klember redhat com>
Date:   Sat Nov 17 21:59:31 2018 +0100

    flatpak: Fix installing flatpakrefs if the remote is already configured
    
    When we parse a flatpakref file and find that the remote for the app is
    already enabled, we try to show the app from the existing remote.
    
    This commit fixes this to actually work.
    
    The code was already there, but instead of returning the app from the
    existing remote, it short circuited the flatpakref loading and returned
    a half-loaded flatpakref GsApp that didn't have the associated runtime
    correctly set up, and things went downhill from there on.
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/517

 plugins/flatpak/gs-plugin-flatpak.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index d5435ecf..0792e89c 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -862,7 +862,7 @@ gs_plugin_flatpak_file_to_app_ref (GsPlugin *plugin,
        ref = gs_flatpak_app_get_ref_display (app);
        app_tmp = gs_plugin_flatpak_find_app_by_ref (plugin, ref, cancellable, NULL);
        if (app_tmp != NULL)
-               return g_steal_pointer (&app);
+               return g_steal_pointer (&app_tmp);
 
        /* force this to be 'any' scope for installation */
        gs_app_set_scope (app, AS_APP_SCOPE_UNKNOWN);


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