In the context of snapcraft pushing its own snap into the LXD container, along with the core snap, I was looking at how to get the relevant information. While I know the SNAP_REVISION for snapcraft itself, I don’t know what core snap revision is currently being used.
There seem to be several ways to get a revision right now:
- readlink /var/snap/core/current
- snap list core
Name Version Rev Developer Notes
core 16-2 1689 canonical -
Not very suitable for parsing. Is this format stable?
- snap info core
summary: "snapd runtime environment"
The core runtime environment for snapd
installed: 16-2 (1689) 83MB -
refreshed: 2017-04-11 14:28:54 +0200 CEST
The installed value is what I’d be interested in, except it doesn’t seem to lend itself well to parsing.