mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
* cmd/snaplock/runinhibit: save revision when snap is inhibited This is handy to be used by "snap run" to get snap info when the "current" symlink is not available (i.e. during a refresh after the snap is unlinked). An extra data JSON file is created <inhibit-dir>/<snap>.<hint>. This is needed to carry more information that is needed by "snap run" while the snap is inhibited. It can be expanded to add more data as needed. Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com> * o/hookstate/hooks: reuse saved inhibit info in gate-auto-refresh hook Done() method Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com> * cmd/snaplock/runinhibit: update doc comments for InhibitInfo and LockWithHint Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com> * cmd/snaplock/runinhibit: rename InhibitInfo.Revision to InhibitInfo.Previous to make it clearer. Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com> * cmd/snaplock/runinhibit: sync hint file write ops for more reliability Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com> * cmd/snaplock/runinhibit: refactor Hint and InhibitInfo validation as a type method Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com> * cmd/snaplock/runinhibit: change ioutil.WriteFile to os.WriteFile Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com> --------- Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com>