invalid track in channel name: /stable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Undecided
|
John Lenton |
Bug Description
With snapd 2.41 (currently pre/beta), when trying to refresh a snap, I am getting the error:
error: cannot refresh "<snapname>": invalid track in channel name: /stable
we used to be able to refresh things by specifying something like "... --channel=
[Reproducing]
This is easy to reproduce:
$ sudo snap install hello --channel=/stable
$ sudo snap refresh hello --beta
(you could use anything else too: --channel=/stable, --channel=edge, --edge, etc)
error: cannot refresh "hello": invalid track in channel name: /stable
This has always worked in the past, with this new 2.41 snapd was the first time I've seen that it didn't
[Impact]
In our case, we have some of our systems that we've used for testing that keep rolling forward/back as needed. Because of that, these systems already have most snaps installed in a state where they are tracking something like "/stable" or "/beta". Once a system like that is upgrade to include snapd 2.41, it can no longer refresh any of those snaps, without reverting snapd to 2.40. If others have systems where snaps have been installed or refreshed like this before, they would be similarly impacted.
affects: | snapstore → snapd |
Changed in snapd: | |
assignee: | nobody → Facundo Batista (facundo) |
assignee: | Facundo Batista (facundo) → nobody |
description: | updated |
Changed in snapd: | |
assignee: | nobody → Ian Johnson (anonymouse67) |
Changed in snapd: | |
assignee: | Ian Johnson (anonymouse67) → John Lenton (chipaca) |
Can you make the default value of $TRACK (i.e. if it's not assigned something else) "latest"?
something like TRACK={ $TRACK: -latest}
Can you strip the leading slash so the channel spec if $TRACK is empty is only a risk name, which should work well and target the default track?
Something like
CHAN=`echo $TRACK/stable | sed 's/^\///'
--channel=$CHAN
(note that right now "default" track is always "latest" but that might change in the very near future with the "default" track functionality - so it's always best to specify "latest" explicitly if that's what you want, because you don't know when a snap author will designate a non-latest track as default.