GNOME Bugzilla – Bug 774509
flatpak: runtime should check for changes to manifest and remove build-init directory
Last modified: 2016-11-18 02:53:54 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.
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.
I like the idea of hashing the manifest. Maybe we could make the hash part of the folder name that the build is in.
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.
Attachment 340101 [details] pushed as cf33af1 - flatpak: Use manifest checksum in runtime id