Snaps still cause trouble blog home

Posted Monday, 24-Mar-2025 by Ingo Karkat

what happened

I've finally upgraded the last Ubuntu 22.04 system (my daughter's) to Ubuntu 24.04 LTS (my wife got a new notebook, so I didn't have to upgrade hers). That's the most plain, least customized system in our household, so I risked doing the upgrade without the usual disk image creation. Boy, did I regret that!

At first, everything went swimmingly, but then suddenly the upgrade appeared "hung" in the middle of the installations. The bottom terminal part of the graphical upgrader (which I always open out of technical interest) showed a confirmation screen alerting that the Thunderbird package would be converted from native Deb package to a Snap. Why it had to tell me that as part of the installation, I don't know. But even worse

Oh noes! I knew that the Debian package management is pretty robust, and had once restarted another aborted upgrade via dpkg --configure -a, but I'd rather not go down that route again. I opened htop to view the upgrade processes, and found a funnily named whiptail command at the bottom of the process list. display dialog boxes from shell scripts says its man page. Aha! Luckily, killing that process didn't abort the package installation (which would have just hastened what I had to do to get out of the situation, anyway, so shrugs) — as it's a simple information, the script likely doesn't even check the exit status. Instead, the upgrade started moving forward again, and eventually finished successfully. Disaster averted.

why

Surely, I can't be the only person who encountered this — Thunderbird is a very popular application, and most desktop users presumably use the graphical upgrader that is offered by the package manager automatically. And I'm fairly late with upgrading — the release had been out for 11 months already.

Though I couldn't find a bug, there is a Launchpad question about this, which fortunately points people in the right direction (but unfortunately also has several useless comments as well — I've added my alternative solution to improve its overall quality).

Apart from not working during the graphical upgrade, the dialog is mostly useless, because

And most of all, assuming a terminal connection is wrong, especially because the Deb packages have a sophisticated mechanism for handling user input during package installation in the form of debconf, which includes a simple protocol and API bindings for shell, Perl, and Python! This supports the terminal, Gnome and KDE graphical environments, as well as non-interactive (a.k.a. silent) installs. I haven't looked deeply into how exactly the Thunderbird migration package is launching the notification, but I'm quite sure that use case would be covered. It's likely just ignorance by the developers. But hey, did nobody test an interactive graphical upgrade at all at Canonical?!

final words

Even though I got lucky, you don't want these kinds of problems during a critical procedure. It undermines the trust in the system.

I already had bitter memories of the time when the Firefox package got converted from native to Snap (during the 20.04 to 22.04 upgrade), and the Snap version of Firefox had several shortcomings for a power-user like me (add-ons like the Gnome shell plugin not working at all, and add-ons having problems launching external processes). I had to spend several hours to investigate possible solutions and work out robust steps to move back to a native package. (As always, there were plenty of sources listing the steps, but none was perfect, so I had to compare and distill a good approach from several different ones.)

Though I'm not a Snap-hater, the benefits seem to be more on the side of the developers, not the users (as Debian package management is rock-solid and feature-rich), and it irks me that I have to be bothered by it. In fact, those people who abhor Snap and ban it from their systems experienced a complete upgrade failure with 24.04. Not good.

Ingo Karkat, 24-Mar-2025

ingo's blog is licensed under Attribution-ShareAlike 4.0 International

blog comments powered by Disqus