[gnome-software/wip/kalev/gnome-3-22: 93/96] trivial: Always handle flatpakrefs with the temp installation
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/gnome-3-22: 93/96] trivial: Always handle flatpakrefs with the temp installation
- Date: Tue, 7 Mar 2017 16:31:53 +0000 (UTC)
commit e35bba0d21a321a67018e0601433b5df555fd446
Author: Richard Hughes <richard hughsie com>
Date: Mon Feb 27 20:46:43 2017 +0000
trivial: Always handle flatpakrefs with the temp installation
src/plugins/gs-plugin-flatpak.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-flatpak.c b/src/plugins/gs-plugin-flatpak.c
index 4b3fbf2..3a4940d 100644
--- a/src/plugins/gs-plugin-flatpak.c
+++ b/src/plugins/gs-plugin-flatpak.c
@@ -416,6 +416,16 @@ gs_plugin_update_app (GsPlugin *plugin,
return gs_flatpak_update_app (flatpak, app, cancellable, error);
}
+static gboolean
+gs_plugin_flatpak_file_to_app_for_scope (GsFlatpak *flatpak, AsAppScope scope)
+{
+ if (gs_flatpak_get_flags (flatpak) & GS_FLATPAK_FLAG_IS_TEMPORARY)
+ return TRUE;
+ if (_as_app_scope_is_compatible (scope, gs_flatpak_get_scope (flatpak)))
+ return TRUE;
+ return FALSE;
+}
+
gboolean
gs_plugin_file_to_app (GsPlugin *plugin,
GsAppList *list,
@@ -436,7 +446,7 @@ gs_plugin_file_to_app (GsPlugin *plugin,
/* run any objects with the corrext scope */
for (guint i = 0; i < priv->flatpaks->len; i++) {
GsFlatpak *flatpak = g_ptr_array_index (priv->flatpaks, i);
- if (!_as_app_scope_is_compatible (scope, gs_flatpak_get_scope (flatpak))) {
+ if (!gs_plugin_flatpak_file_to_app_for_scope (flatpak, scope)) {
g_debug ("not handling bundle as scope incorrect");
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]