[gnome-software/gnome-3-22] trivial: Always handle flatpakrefs with the temp installation



commit 63252e37f7da8c35c0c8a1f70067fdae1152aac4
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]