Skip to content

flatpak: Fix offline installation

Phaedrus Leeds requested to merge fix-flatpak-offline-install into master

This commit fixes offline installation of .flatpak bundles, and fixes offline installation of .flatpakref files that point to a file:// URL. Currently such installations would be forever stuck in the "Pending installation..." state. The check for a file:// prefix on the gs_app_get_origin_hostname() return value is wrong because in case a file:// URL is set, "localhost" is returned. See gs_app_func() in lib/gs-self-test.c.

One might wonder if this could be implemented by checking if gs_app_get_local_file() returns a non-NULL value, but gs_app_set_local_file() is called for flatpakref files which are not always offline friendly.

This commit comes from https://github.com/endlessm/gnome-software/pull/557

Merge request reports