[gnome-software] trivial: Always handle flatpakrefs with the temp installation
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Always handle flatpakrefs with the temp installation
- Date: Tue, 28 Feb 2017 12:00:20 +0000 (UTC)
commit 0b1e49c468494c985c9cfffefe2132a95b222c7d
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 0895ca8..1d1e67a 100644
--- a/src/plugins/gs-plugin-flatpak.c
+++ b/src/plugins/gs-plugin-flatpak.c
@@ -442,6 +442,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,
@@ -462,7 +472,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]