Hi all. I am working on a new ubuntu-package-manifest strict snap to list installed packages and snaps on the host system. Following advice in the forum I am using the system-backup interface and /var/lib/snapd/hostfs/
to access dpkg data on the host but I was unable to find a way to do something similar for listing installed snaps on the host system.
Instead I was wrote a simple python script which parses /var/lib/snapd/hostfs/var/lib/snapd/ and each snap’s snap.yaml https://github.com/CanonicalLtd/ubuntu-package-manifest/blob/main/snap/local/list-snaps.py to produce a list of snaps (example: https://pastebin.ubuntu.com/p/8JrCzhQxDy/). But in doing it this way I lose the tracking information
tracking: latest/stable
I searched the snapd code. My golang foo is lacking but what I now assume is that the tracking information is from the snap store and not from anything written on disk. Is this true?
And if not, where is this information?
I used strace on snap info aws-cli
but I couldn’t see it accessing any related local files other than /snap/aws-cli/current/meta/snap.yaml and this does not contain the tracking information.