Snap channel cannot be changed to 'stable'

Bug #1792673 reported by Barry Price
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snap Layer
Fix Released
High
Stuart Bishop

Bug Description

Calling the snap.refresh() function to change a snap's channel from e.g. 'stable' to 'beta' works fine.

But attempting to change channel from anything else back to 'stable' will fail.

The refresh() function calls _refresh_store(), which extends the command to be run via _snap_args(**kw), which is the heart of the issue:

https://github.com/stub42/layer-snap/blob/master/lib/charms/layer/snap.py#L239

> if channel != 'stable':
> yield '--channel={}'.format(channel)

Removing the conditional here would solve this particular issue.

Perhaps it should be comparing the currently selected channel to the requested channel?

Stuart Bishop (stub)
Changed in layer-snap:
assignee: nobody → Stuart Bishop (stub)
importance: Undecided → High
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.