Using branches with stage-snaps

For testing purposes, I’m trying to use a branch of a stage snap, but this either isn’t supported, or doesn’t have the obvious syntax. I have:

  mir-kiosk-x11:
    plugin: nil
    stage-snaps: [mir-kiosk-x11/edge/core18]

But that fails with:

Failed to install or refresh a snap: ‘mir-kiosk-x11’ does not exist or is not available on the desired channel ‘edge/core18’. Use snap info mir-kiosk-x11 to get a list of channels the snap is available on.

(Inserting latest doesn’t help)

We have a long standing bug that requires you to add the track in the channel syntax, sorry about that

I can’t parse your comment into a syntax that works (I’ve tried various permutations of latest, edge and core18 with the same result).

I’m not sure which bug you are referring to, should I just raise a new one?

I think @sergiusens means you need to prepend the track name latest (or whichever you have/want) before the risk level:

mir-kiosk-x11:
    plugin: nil
    stage-snaps: [mir-kiosk-x11/latest/edge/core18]

cf. docs (I have to re-read those constantly … :sweat_smile:)

BUT: I ran a quick test with a fresh snapcraft init and the above stage-snaps stanza resulted in the same error:

Failed to install or refresh a snap: 'mir-kiosk-x11' does not exist or is not available on the desired channel 'latest/edge/core18'. Use `snap info mir-kiosk-x11` to get a list of channels the snap is available on.

However, snap install mir-kiosk-x11 --channel=latest/edge/core18 works fine and downloads revision 13, while latest/edge has revision 10.

@sergiusens Does snapcraft support branches in stage-snaps?

2 Likes

It seems that using a branch name in a channel fails for stage-snaps and for build-snaps. See Bug #1901733, “stage-snaps not usable with branches.”