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 774509 - flatpak: runtime should check for changes to manifest and remove build-init directory
flatpak: runtime should check for changes to manifest and remove build-init d...
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-16 07:03 UTC by Christian Hergert
Modified: 2016-11-18 02:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
flatpak: Use manifest checksum in runtime id (2.71 KB, patch)
2016-11-17 06:28 UTC, Matthew Leeds
committed Details | Review

Description Christian Hergert 2016-11-16 07:03:22 UTC
If the user changes the runtime (say from 3.20 to master) in the manifest json file, then we fail to use the new runtime. We continue using the old 3.20 runtime.

We need to do something like hashing the manifest content and removing the build-init directory if it mismatches. I'm not sure where we should save that hash in-between runs though.
Comment 1 Christian Hergert 2016-11-16 07:04:44 UTC
I should note that it's not super important to me to handle manifest changes at runtime (i think its okay if we wait until next project load), but upon project re-load we still have the issue.
Comment 2 Matthew Leeds 2016-11-16 22:37:19 UTC
I like the idea of hashing the manifest. Maybe we could make the hash part of the folder name that the build is in.
Comment 3 Matthew Leeds 2016-11-17 06:28:16 UTC
Created attachment 340101 [details] [review]
flatpak: Use manifest checksum in runtime id

By including a checksum of the contents of the flatpak manifest in its
runtime id, we can ensure that changing the manifset results in using a
different build directory (which allows the changes to take effect).
However this approach has a few disadvantages:
(1) If the manifest never returns to a previous state, that build
directory's disk space is wasted.
(2) The runtime id appears in the omni bar which is ugly.
(3) The runtime id is written to the .buildconfig file which means if
the project is reloaded with an edited manifest, the runtime appears
as missing.
Comment 4 Christian Hergert 2016-11-18 02:53:49 UTC
Attachment 340101 [details] pushed as cf33af1 - flatpak: Use manifest checksum in runtime id