After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780249 - flatpak: Properly ensure GNOME remotes exist
flatpak: Properly ensure GNOME remotes exist
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-18 20:55 UTC by Matthew Leeds
Modified: 2017-03-18 22:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flatpak: Properly ensure GNOME remotes exist (7.35 KB, patch)
2017-03-18 20:55 UTC, Matthew Leeds
committed Details | Review
flatpak: Refresh installations after adding remotes (1.55 KB, patch)
2017-03-18 20:55 UTC, Matthew Leeds
committed Details | Review

Description Matthew Leeds 2017-03-18 20:55:10 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.
Comment 1 Matthew Leeds 2017-03-18 20:55:14 UTC
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).
Comment 2 Matthew Leeds 2017-03-18 20:55:18 UTC
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.
Comment 3 Christian Hergert 2017-03-18 21:48:10 UTC
Review of attachment 348235 [details] [review]:

LGTM
Comment 4 Christian Hergert 2017-03-18 21:48:56 UTC
Review of attachment 348236 [details] [review]:

magic!
Comment 5 Christian Hergert 2017-03-18 22:17:19 UTC
Attachment 348235 [details] pushed as d664683 - flatpak: Properly ensure GNOME remotes exist
Attachment 348236 [details] pushed as 3e0ea1e - flatpak: Refresh installations after adding remotes