[gnome-software/gnome-3-32] flatpak: Fix launching Flatpak apps when runtime versions change



commit 78c6094daca344a21a5836b2ce768ef17e16077e
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Tue Jan 10 14:36:21 2017 +0100

    flatpak: Fix launching Flatpak apps when runtime versions change
    
    The apps rely on the runtimes declaration in the repo's AppStream file.
    This information however relates to the app's version that is given by
    the server, which may need a different runtime (because of a update)
    than what is installed; thus, these changes drop the check that verifies
    whether the runtime is installed before launching the app, delegating
    that responsibility to Flatpak itself which prevents mistakenly assuming
    that the runtime is not installed.
    
    This is a partial revert of commit 6ce59bab7c from
    https://bugzilla.gnome.org/show_bug.cgi?id=765055. Since then, flatpak
    transactions mean we’re a lot better at ensuring the correct runtime is
    installed when an app is installed, so the situation from the original
    bug report should never really be hit any more.

 plugins/flatpak/gs-flatpak.c | 18 ------------------
 1 file changed, 18 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index bde75d0b..d7e44a9a 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -2294,24 +2294,6 @@ gs_flatpak_launch (GsFlatpak *self,
                   GCancellable *cancellable,
                   GError **error)
 {
-       GsApp *runtime;
-
-       /* check the runtime is installed */
-       runtime = gs_app_get_runtime (app);
-       if (runtime != NULL) {
-               if (!gs_flatpak_refine_app_state (self, runtime, cancellable, error))
-                       return FALSE;
-               if (!gs_app_is_installed (runtime)) {
-                       g_set_error_literal (error,
-                                            GS_PLUGIN_ERROR,
-                                            GS_PLUGIN_ERROR_NOT_SUPPORTED,
-                                            "runtime is not installed");
-                       gs_utils_error_add_origin_id (error, runtime);
-                       gs_plugin_cache_add (self->plugin, NULL, runtime);
-                       return FALSE;
-               }
-       }
-
        /* launch the app */
        if (!flatpak_installation_launch (self->installation,
                                          gs_flatpak_app_get_ref_name (app),


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