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
1689
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
name: core
summary: “snapd runtime environment”
publisher: canonical
description: |
The core runtime environment for snapd
type: core
tracking: stable
installed: 16-2 (1689) 83MB -
refreshed: 2017-04-11 14:28:54 +0200 CEST
channels:
The installed value is what I’d be interested in, except it doesn’t seem to lend itself well to parsing.
I think the goal is to install the version of core on the host, right? Which is a simple matter of grabbing the snap out of /var/lib/snapd/snaps/, as well as its assertion from snap known.
What would I set it to, though? Can I set it to eg. “never” and take care of it manually? The example given in the announcement of that feature uses specific times when it “might” run.
How should this be used then? The snaps snapcraft cares about will be the versions it specifically injected, so it would be counter-productive for them to be updated.