[gnome-software] flatpak: Avoid forcing scope for temporary flatpaks



commit bde7baaaac2fc40228173d3599cf3770f1bbad7d
Author: Kalev Lember <klember redhat com>
Date:   Fri Jan 4 19:51:53 2019 +0100

    flatpak: Avoid forcing scope for temporary flatpaks
    
    This fixes the runtime lookup for temporary (.flatpak and .flatpakref)
    flatpak installations: if the scope isn't set, we look up the runtime in
    the plugin cache and get it back from either the user or system flatpak
    installation.

 plugins/flatpak/gs-flatpak.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 587eb5a3..569e8c56 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -73,11 +73,12 @@ gs_flatpak_claim_app (GsFlatpak *self, GsApp *app)
                return;
        gs_app_set_management_plugin (app, gs_plugin_get_name (self->plugin));
        gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_FLATPAK);
-       gs_app_set_scope (app, self->scope);
 
        /* only when we have a non-temp object */
-       if ((self->flags & GS_FLATPAK_FLAG_IS_TEMPORARY) == 0)
+       if ((self->flags & GS_FLATPAK_FLAG_IS_TEMPORARY) == 0) {
+               gs_app_set_scope (app, self->scope);
                gs_flatpak_app_set_object_id (app, gs_flatpak_get_id (self));
+       }
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]