Core version string

We recently landed support to adding better version information to the core snap.

The previous version of the core snap was 16-2. With the new version support we can put a more meaningful version derived from from the “upstream” version of snapd. The only caveat is that the total version is max. 32 chars long. For releases of snapd this works great, e.g. 16-2.26.1.

We just need to decide what to encode in the development version of snapd. Some options:

16-2.26.1+git.115                # 115 commits since the last tag

More ideas welcome.

Fwiw, we should fix this directly in the build recipe in if we can. The caveat for the build recipe version is that it must follow the dpkg version ordering. But even if we decide to use a different version string that is not dpkg sortable we can fixup things in

iirc we originally discussed

at least that is what my notes say here (since i was working on this initially (though waiting for teh snapcraft support for it that would have avoided any script snippets)

Thanks, this format provides no dpkg version comparable versions, but thats fine, if we just use if for the version info string. Will wait for confirmation. It just means a bit more cut/sed in the version-script in snapcraft.yaml.

well, once the env var feature is finished (the thing i was waiting for) in snapcraft, we should only need to export the value in the Makefile and be done, there wont be any version script needed (i’ll send PRs once it is there, it should simplify the whole thing)