[gnome-software/gnome-3-30] flatpak: Fix installing flatpakrefs if the remote is already configured
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-30] flatpak: Fix installing flatpakrefs if the remote is already configured
- Date: Mon, 19 Nov 2018 11:46:35 +0000 (UTC)
commit a9d6e54e9b410703d7fa6ce926816165ec64ef13
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 82c1a20b..ed1a5679 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -861,7 +861,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]