Commit b8bae1d5 authored by Joaquim Rocha's avatar Joaquim Rocha Committed by Richard Hughes

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 6ce59bab 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.
parent eb66c044
Pipeline #89392 passed with stage
in 24 minutes and 17 seconds
......@@ -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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment