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 779330 - flatpak: Reload manifests when they're modified
flatpak: Reload manifests when they're modified
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-02-27 18:23 UTC by Matthew Leeds
Modified: 2017-02-27 21:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flatpak: move manifest parsing code to GbpFlatpakConfiguration (39.78 KB, patch)
2017-02-27 18:23 UTC, Matthew Leeds
none Details | Review
flatpak: reload config when the manifest file is modified (11.29 KB, patch)
2017-02-27 18:23 UTC, Matthew Leeds
none Details | Review
flatpak: delete manifest parsing code in GbpFlatpakRuntime (5.60 KB, patch)
2017-02-27 18:23 UTC, Matthew Leeds
none Details | Review

Description Matthew Leeds 2017-02-27 18:23:44 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.
Comment 1 Matthew Leeds 2017-02-27 18:23:47 UTC
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.
Comment 2 Matthew Leeds 2017-02-27 18:23:50 UTC
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.
Comment 3 Matthew Leeds 2017-02-27 18:23:53 UTC
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.
Comment 4 Matthew Leeds 2017-02-27 21:49:54 UTC
Pushed to master