GNOME Bugzilla – Bug 775863
flatpak: Install the gnome runtime if necessary
Last modified: 2016-12-13 01:05:34 UTC
.
Created attachment 341652 [details] [review] flatpak: Install the gnome runtime if necessary By default GNOME flatpak apps use org.gnome.Platform and org.gnome.Sdk as their runtime and sdk, respectively. This commit makes Builder install those if necessary.
I wonder if we could get the runtime providers to "refresh" so that if someone installs the flatpak runtime between when they open Builder and when they build the app the behavior still makes sense.
Similar to how we use inotify (via GFileMonitor) on the git index, we could probably watch the OSTree index that flatpak uses. I believe those are always mutated with atomic renames, so we should be able to get reliable notification. Possibly the repo/summary file for each configured repo?
Created attachment 341663 [details] [review] flatpak: Refresh list of runtimes when necessary If the user installs or uninstalls a runtime while Builder is running, we want to detect that and update the list of runtimes in the Build Preferences view. This commit accomplishes that using a GFileMonitor. It does have the side effect that the runtimes are reloaded even if an unrelated change happens to the flatpak installation (such as installing or updating apps).
Review of attachment 341663 [details] [review]: Cool! pushed with small patch to use connect_object() for object tracking, CONNECT_SWAPPED, and G_CALLBACK().
Lovely! Attachment 341652 [details] pushed as 1b56a54 - flatpak: Install the gnome runtime if necessary