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



commit b8bae1d5fde9bbc755ef4156099e57f4a33a06bb
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 2397f1b3..55afbed8 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -2298,24 +2298,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]