GNOME Bugzilla – Bug 780249
flatpak: Properly ensure GNOME remotes exist
Last modified: 2017-03-18 22:17:24 UTC
This bug is really easy to reproduce: just delete the gnome remote from your system (check both user and system flatpak installations) and open a project with the org.gnome.Platform runtime. Builder will fail to locate the corresponding SDK and fail to install the runtime. These commits fix the issue.
Created attachment 348235 [details] [review] flatpak: Properly ensure GNOME remotes exist Builder has gnome and gnome-nightly as builtin repos so it can automatically install runtimes from them, but it only adds those remotes in gbp_flatpak_application_addin_install_runtime_worker so they don't necessarily exist in gbp_flatpak_application_addin_locate_sdk_worker, which sometimes runs before the runtime worker. This commit makes sure the remotes exist in both places (because if the GbpFlatpakTransfer is started from the Preferences perspective the locate_sdk_worker doesn't run).
Created attachment 348236 [details] [review] flatpak: Refresh installations after adding remotes This commit makes sure flatpak_installation_list_remotes() returns remotes that were added after the installation object was created.
Review of attachment 348235 [details] [review]: LGTM
Review of attachment 348236 [details] [review]: magic!
Attachment 348235 [details] pushed as d664683 - flatpak: Properly ensure GNOME remotes exist Attachment 348236 [details] pushed as 3e0ea1e - flatpak: Refresh installations after adding remotes