forked from pool/gnome-software
- Add gnome-software-fix-installing-flatpakref.patch: flatpak: Fix installing flatpakrefs if the remote is already configured (glgo#GNOME/gnome-software#517). OBS-URL: https://build.opensuse.org/request/show/650309 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-software?expand=0&rev=152
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From 80a17dcf9cdcd2179b280e368f812524dafe6bae Mon Sep 17 00:00:00 2001
|
|
From: Kalev Lember <klember@redhat.com>
|
|
Date: Sat, 17 Nov 2018 21:59:31 +0100
|
|
Subject: [PATCH] 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);
|
|
--
|
|
2.19.1
|
|
|