Comment 1 for bug 1650689

Revision history for this message
Simos Xenitellis  (simosx) wrote : Re: snap refresh with a channel arg should offer a way to switch the channel w/out a snap update being available

It's a bug. Let's see more.

$ snap info network-manager
name: network-manager
summary: "Network management based on NeworkManager"
publisher: canonical
description: |
  Network management of wired ethernet, WiFi and mobile data connection based on
  NetworkManager and ModemManager
channels:
  stable: 1.2.2-10 (73) 5MB -
  candidate: 1.2.2-10 (73) 5MB -
  beta: 1.2.2-10 (73) 5MB -
  edge: 1.2.2-10 (112) 5MB -

Let's say you install the "beta":

$ snap install network-manager --channel=beta
network-manager (beta) 1.2.2 from 'canonical' installed

Let's try to switch from 'beta' to 'stable':

$ snap refresh network-manager --channel=stable
snap "network-manager" has no updates available

Because 'stable' and 'beta' are currently identical, the channel switching code refuses to make the switch, and start tracking the new channel.

A nasty workaround in this case would be to switch first to 'edge', then switch to 'stable'. Because these are different, the switching will work.

WHAT SHOULD HAPPEN:
If two channels have identical snaps, then 'snap refresh' should be able to change the tracking and track the new channel.