Snapcraft.yaml reference

Thanks so much for pointing this out. Something must have changed in the way we render the table. I’ll chase this up and get this fixed asap. Thanks!

The possible values for the snap’s type are different between these docs:

The latter does not include ‘core’ as a possible snap type. Also, there seems to be no separate page devoted to the explanation of the snaps with the type core.

The “core” type is historical and only used for the “core” snap. No other snap should sport the “core” type. I’m not even sure snapcraft can build a “core” snap, I know the core snap itself is not built using snapcraft. This is for context, not saying that our docs shouldn’t be clearer on this.

1 Like

Thanks for the added context (and the original query). I’ve now added notes to both of those documents to say that the core type has been deprecated.

cc @dmitry.lyfar

1 Like

I noticed that it is possible to set global environment variables for a snap via environment key in snapcraft.yaml, but it isn’t documented. This is very useful, because these environment variables propagate to all hooks and apps with fewer repetition.

The meta/snap.yaml file for a core22 based snap has the following:

  PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH

The current drawback when making changes to the above two variables via snapcraft.yaml is that the snap loses the additions made by snapcraft.

1 Like

Hello! Thanks so much for mentioning this, and you’re absolutely right. I have added this now, but I’ve also created a todo task to cover global environment variables in more detail.

1 Like

The documentation for apps. <app-name>. restart-condition is broken, other values besides on-failure are cut off: “Defaults to on-failure. Other values are `[on-failure”.

1 Like

Good spot - thank you for letting us know. We needed to escape the pipe character.

Also the string beginning with “bzr”, I submitted an edit.

Perfect, thanks for making the edit!

I believe filesets have been dropped ? [ for ref: Snapcraft filesets ]

Not only are they still mentioned here, they are the main source of reference for how to use the stage and prime part keywords, which seems a bit confusing now.

Cheers, Just