First of all, I understand that the main point of snaps is to simplify package management by making them relocatable and less dependent of the root filesystem. But since snapcraft allows to choose the base image (base snaps), what are the downsides of it? Why not do this for every second package? It seems to be the simplest way to migrate from an apt package.
All snaps have a base image. If you don’t specify one, they’ll use core. It includes what we think is a bare minimum needed for a workable system (and some base images are bootable, and can be used to create a snap-only device).
try it! Make that base, and install it locally, and then make a snap that uses it.
There are a lot of little things that need to be “just right” in a base snap, and the process is not yet documented as it’s still evolving somewhat, but it’s doable. snapcraft won’t be helping you much (beyond snapcraft pack), for the base. Maybe look at core's (or bare's) meta/snap.yaml for ideas.
yes, you’re wrong. Or perhaps I’m misunderstanding what you mean. What would you chroot to, and from where, to what purpose?
I’ll turn this around: look at the busybox-static snap. It uses the bare base snap. Now, bare is only available on the edge channel—because again this is still being worked on—so it won’t get pulled in automatically, but you can install it by hand (snap install --edge bare) and then install the snap that uses it (snap install --edge busybox-static). So, do that, and look at what you have in /snap/bare/current/: that is the minimum stuff you need to have for a base to work (some of it shouldn’t be needed, but for now it is), and compare it with the default base, /snap/core/current/, and a snap that uses it (for example, test-snapd-tools). Then, look at /snap/busybox-static/current/. And try snap run --shell busybox-static; also try snap run --shell test-snapd-tools.cat
Yes, documentation of bases is not ready yet. Neither is the feature.
snapcraft does not yet support the base key directly; you can pass it into the snap.yaml using the passthrouogh feature, as I described above. However if you need snapcraft to build the snap for you, you’ll need to hold its hand if you’re using a different base as otherwise it will do entirely the wrong thing.
As for “possible values”, you can use the name of any snap that is type: base. There’s only one supported base, today, the (default or implicit) core base. I know of a few other bases that are in different stages of development, at least two of which I can mention without ruining anybody’s surprise: bare and core18.