GNOME Bugzilla – Bug 779330
flatpak: Reload manifests when they're modified
Last modified: 2017-02-27 21:49:54 UTC
These patches seem to work but I wonder if the load_from_file one should be made async. It's called in a worker thread when the provider is first loading them, but then the manifest_changed callback is called from the main thread I think.
Created attachment 346855 [details] [review] flatpak: move manifest parsing code to GbpFlatpakConfiguration It makes more sense for the code that parses flatpak manifests to be in the Config rather than the ConfigProvider class, especially since it will make it easier to reload them when the manifest is modified.
Created attachment 346856 [details] [review] flatpak: reload config when the manifest file is modified If the user edits the manifest file while Builder is running, the GbpFlatpakConfiguration based on that manifest should automatically update. This commit implements that behavior by adding a GFileMonitor on each manifest file in GbpFlatpakConfigurationProvider. It also attempts to have reasonable behavior if the file is deleted or moved.
Created attachment 346857 [details] [review] flatpak: delete manifest parsing code in GbpFlatpakRuntime Now that manifest configurations reload themselves when the file changes, there's no point in parsing the manifest again in gbp_flatpak_runtime_create_launcher (because the provider calls the function to parse it). The info in the config should already be up to date.
Pushed to master