My understanding have been that the install/update process is basically
Download the assert
Download the snap
Ack the assert
Install the snap
It seems that the assert does not contain any information about the channels. So how does snapd “know” for subsequent updates which channel it will be tracking.
Does it read from the “sequence” block of a snap in /var/lib/snapd/state.json
In my current store implementation which basically
Downloads the assert and snap
Acks assert and install snaps
I am looking to implement a way where I can keep a track of which channel my snap is tracking and hence on subsequent updates “know” where to pull the update from.
the entries in sequence are just bookkeeping iirc. If you look at the store API, there’s a tracking-channel field included in the request https://api.snapcraft.io/docs/refresh.html. It’s probably easiest if you take a look at snapd source code in the snapstate and store packages.