I like the proposal overall because it is encoding somewhere in the name and/or the slot name the distribution release (eg, ‘16-10’ for Ubuntu 16.10) which makes it easy to both reuse the content (“as a developer, I want to build a snap using Ubuntu 16.10 toolchain and binaries and I want to use the GNOME content snap. Oh, I’ll pick gnome-16-10”) and helps avoid user confusion because the correct content snap can easily be pulled in for a given snap.
I also like how the proposal acknowledges that this is a short term way to move forward since it is more about giving developer guidelines for collaboration rather than an implementation that enforces things, but that we’ll improve on this with a good implementation going forward.
+1 on the general idea of encoding the distro/release version in ways to make things clear.
It seems possible that we’ll want to have different GNOME versions provided by content snaps (eg, 3.24, 3.22, 3.18, etc). It seems probable that we’ll want to have each GNOME version built on different releases. Eg, 3.24 for 17.10 and 16.04, 3.18 for 16.10 and 16.04, etc.
That said, I think it would be interesting to work through different yaml examples (perhaps you already did this… Maybe we’ll NAK all of these, but at least they will have been discussed :). @niemeyer, if I didn’t capture the yaml/cli experience you were thinking of down below, can you respond with your ideas?
question #1 - is ‘16-10’ too Ubuntu-specific?
‘16-10’ implies Ubuntu 16.10, which on the surface feels a little weird if considering the long tail of things. Will ‘26’ imply Fedora 26? That said, since this is only a short-term solution (we don’t even have alternate bases yet), maybe it doesn’t matter?
question #2 - what does this look like in practice?
suggested yaml from video
Eg, consider the following snap.yaml for the GNOME content snap which I think is what you proposed in the video (please correct me!):
name: gnome-16-10
version: 3.24
slots:
gnome:
content: gnome-16-10
...
which yields the following cli experience (for a manual connection):
$ snap install gnome-16-10
$ snap install foo
$ snap connect foo:gnome-16-10 gnome-16-10:gnome-16-10
It isn’t clear that gnome-16-10 contains gnome 3.24 (which, granted, the user doesn’t technically have to care about, and the version can be obtained via snap info gnome-16-10
) and there is a lot of ‘gnome-16-10’ in the connect command. Lastly, it means that we can’t have both a GNOME 3.24 ‘gnome-16-10’ snap and a GNOME 3.18 ‘gnome-16-10’ snap installed at the same time.
Perhaps it was your intent to convey that the gnome-16-10 snap contains not only the libc, libgcc, etc from 16.10 but also be the GNOME runtime that was included in 16.10 (therefore, gnome-16-04 contains GNOME 3.18, gnome-16-10 contains GNOME 3.20 and gnome-17-10 contains GNOME 3.24)?
For sake of the conversation, here are some alternate examples (I found it helpful to work through developer/user experiences like this):
alternate yaml #1
name: gnome-3-24
version: 3.24.2
slots:
16-10:
content: 16-10
16-04:
content: 16-04
then the experience becomes:
$ snap install gnome-3-24
$ snap connect foo:16-10 gnome-3-24:16-10
This does convey the 3.24-ness of the snap, but because the name is ‘gnome-3-24’, it means it must be artificially large to contain different distro/releases (since we aren’t using tracks in this example).
alternate yaml #2
name: gnome-16-10
version: 1.2.3
slots:
gnome-3-24:
content: gnome-3-24
gnome-3-18:
content: gnome-3.18
This is a big content snap that clearly shows it has 16-10 compatible contents and it contains different GNOME versions. The experience then is:
$ snap install gnome-16-10
$ snap connect foo:gnome-3-24 gnome-16-10:gnome-3-24
This is pretty clear and similar to the suggested yaml (AIUI). It allows for different distro/release snaps to be co-installed. It allows for the distro/release to contain different GNOME versions if desired, but that isn’t a requirement.
alternate yaml #3
Encode the GNOME version and the distro/release in the name:
name: gnome-3-24-16-10
version: 1.2.3
slots:
16-10:
content: 16-10
Experience:
$ snap install gnome-3-24-16-10
$ snap connect foo:16-10 gnome-3-24-16-10:16-10
That’s a pretty terrible name and awkward cli experience.
alternate yaml #4 (with track)
Some of the yaml above somewhat addresses multiple GNOME versions and distro/releases, but is space-inefficient (“why should I need to download 3.18 with 3.24 if all the snap needs is 3.24?”). As such, it seems we could possibly utilize tracks to help with this, but I’m not sure what would be the best way.
Perhaps create a 3.24 track for gnome-16-10:
name: gnome-16-10
version: 3.24
slots:
3-24:
content: 3-24
and a 3.18 track for gnome-16-10:
name: gnome-16-10
version: 3.18
slots:
3-18:
content: 3-18
then the experience is:
$ snap install gnome-16-10 --channel=3.24/stable
$ snap connect foo:3-24 gnome-16-10:3-24
This doesn’t help with having GNOME 3.24 and 3.18 co-installable for 1610.
alternate yaml #5 (with track)
Or, use channels for ‘gnome-3-24’ snaps. Eg, can create a 16.10 channel:
name: gnome-3-24
version: 3.24
slots:
16-10:
content: 16-10
then:
$ snap install gnome-3-24 --16.10/stable
$ snap connect foo:16-10 gnome-3-24:16-10
This allows different GNOME versions installed, but you can’t have, for example, gnome-3-24 for both 16-04 and 16-10 installed at the same time.
summary
I’m not sure which experience is best (maybe alternate #2, since it is basically the suggested idea with the option of having more GNOME versions inside…), but it seems that some of the criteria should be:
- need to encode the distro/release (eg, 16-10)
- need to be able to have different versions of GNOME installed at the same time (eg, 3.24 and 3.18 both for 16-10)
- it should be possible for snapd/the user to easily know what to install and connect
- the cli experience should not be awkward