[gnome-software/wip/hughsie/flatpak] flatpak: Find the system-wide runtime for a user flatpak app
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/flatpak] flatpak: Find the system-wide runtime for a user flatpak app
- Date: Thu, 28 Feb 2019 14:13:17 +0000 (UTC)
commit aa86d16493a5e72b045176c16c58df03ef016b79
Author: Richard Hughes <richard hughsie com>
Date: Thu Feb 28 14:08:38 2019 +0000
flatpak: Find the system-wide runtime for a user flatpak app
plugins/flatpak/gs-flatpak.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index cad8ea87..6cad012e 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1762,6 +1762,14 @@ gs_flatpak_create_runtime (GsFlatpak *self, GsApp *parent, const gchar *runtime)
return g_steal_pointer (&app_cache);
}
+ /* if the app is per-user we can also use the installed system runtime */
+ if (gs_app_get_scope (parent) == AS_APP_SCOPE_USER) {
+ gs_app_set_scope (app, AS_APP_SCOPE_UNKNOWN);
+ app_cache = gs_plugin_cache_lookup (self->plugin, gs_app_get_unique_id (app));
+ if (app_cache != NULL)
+ return g_steal_pointer (&app_cache);
+ }
+
/* set superclassed app properties */
gs_flatpak_app_set_ref_kind (app, FLATPAK_REF_KIND_RUNTIME);
gs_flatpak_app_set_ref_name (app, split[0]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]