I think the "Updating snaps" line is misleading. It's not doing what you think - and not what any reasonable person - would expect.
I took a look at the code for update-manager, and while I'm no developer, I think I understand what's going on.
The code looks like it says "Updating snaps" then proceeds to get a list of snaps which are being migrated from deb
to snap
- such as lxd
, firefox
and chromium-browser
. It then processes them, if there are any, then moves on. It doesn't process any already-installed snaps, as you might expect.
The message "Updating snaps" should probably be something like "Processing deb to snap migrations" or similar.
Here's the code.
def update_snaps(self):
# update status and progress bar
def update_status(status):
GLib.idle_add(self.label_details.set_label, status)
def update_progress(progress_bar):
progress_bar.pulse()
return True
update_status(_("Updating snaps"))
progress_bar = None
progress_timer = None
progress_bars = self.progressbar_slot.get_children()
if progress_bars and isinstance(progress_bars[0], Gtk.ProgressBar):
progress_bar = progress_bars[0]
progress_timer = GLib.timeout_add(100, update_progress,
progress_bar)
# populate snap_list with deb2snap transitions
snap_list = self.get_snap_transitions()
if progress_timer:
GLib.source_remove(progress_timer)
progress_bar.set_fraction(0)
# (un)install (un)seeded snap(s)
try:
client = Snapd.Client()
client.connect_sync()
index = 0
count = len(snap_list)
for snap, snap_object in snap_list.items():
command = snap_object['command']
if command == 'refresh':
update_status(_("Refreshing %s snap" % snap))
client.refresh_sync(snap, snap_object['channel'],
self.update_snap_cb,
progress_callback_data=(index, count,
progress_bar))
elif command == 'remove':
update_status(_("Removing %s snap" % snap))
client.remove_sync(snap, self.update_snap_cb,
progress_callback_data=(index, count,
progress_bar))
else:
update_status(_("Installing %s snap" % snap))
client.install_sync(snap, snap_object['channel'],
self.update_snap_cb,
progress_callback_data=(index, count,
progress_bar))
index += 1
except GLib.Error as e:
logging.debug("error updating snaps (%s)" % e)
GLib.idle_add(self.window_main.start_error, False,
_("Upgrade only partially completed."),
_("An error occurred while updating snaps. "
"Please check your network connection."))
return
# continue with the rest of the updates
GLib.idle_add(self.window_main.start_available)