Are manual deb-to-snap/snap-to-deb migrations necessary to keep a system up-to-date?

Asked by Naël on 2020-04-25

Ubuntu systems are kept up-to-date by the administrator upgrading deb packages with the apt command and by snapd refreshing snap applications.

During the development of 20.04, some snap applications were replaced by their equivalent deb, and one deb package was replaced by its equivalent snap. Marcus Tomlinson implemented special logic in update-manager to handle these deb-to-snap/snap-to-deb migrations and ensure that the same application was not left in both its deb and snap forms. This is documented in bug 1868409 and bug 1872958.

Jonathan Kamens and myself are now wondering (in bug 1861631 comments 15 to 19) if this special logic is something that we, as administrators of our Ubuntu systems, are supposed to trigger regularly to keep our systems up-to-date?

* If yes, is it possible to do it on the command line, or do we need to run the graphical application update-manager?
* If no, is it because such migrations are perhaps limited to development releases and won't happen after release time?

Bonus question: is this special logic also triggered by do-release-upgrade?

Thank you very much in advance for your help

The short answer is no, admins are not expected to trigger update-manager regularly to keep systems up-to-date, and yes, we intend for such migrations to occur only on release upgrades.

Perhaps I can clarify better by answering the bonus question first. Yes, do-release-upgrade was updated on 2020-02-27 to ensure that all deb-to-snap / snap-to-deb migrations were performed during release upgrade. This means that as of 2020-02-27, those who upgrade from Eoan or earlier to Focal will land on Focal with all migrations already done, thus business as usual for admins - no need to run update-manager.

The changes to update-manager were necessary for those who were already on Focal before 2020-02-27. The thinking here was that those who use update-manager would be automagically migrated, and those who don't would probably be capable of correcting the migrations themselves if they wanted to.

Jonathan Kamens (jik) said : #2

>The changes to update-manager were necessary for those who were already on Focal before 2020-02-27

There's the rub. Many people volunteer to pre-test alpha and beta releases. You haven't really addressed how they're supposed to handle this in the future, when I assume that there will be more deb-to-snap or snap-to-deb migrations.

1) Are we just supposed to keep running update-manager periodically, and has Canonical committed to ensuring that update-manager knows how to handle all necessary migrations?

2) Is some other solution to this problem going to be provided?

We who volunteer our time and effort to pre-test releases just want assurances that the way this problem was solved for 20.04 isn't a one-off solution which is going to entropy in the future, and we want to know what the official solution we're supposed to use in the future for this problem is.

Ok I'm sorry, I realise now that my "short answer" was very misleading, let me try to clarify.

So you're not _expected_ to run update-manager. As I mentioned in the last paragraph, you can perform the same migrations manually via `apt remove` / `snap install` etc. without it. If you want the migrations to occur more _automatically_, then yes, update-manager is the tool for that.

Secondly, while we do _intend_ for such migrations to occur only on release upgrades, there's never anything certain about software right, so sure, it has to be said, it is possible.

So to answer your follow-up questions:


Yes, if you are one that upgrades to a dev series early (thank you, we appreciate you!), and want to be protected against any possible migrations mid-release, and want a more _automatic_ update solution, you will want to run update-manager periodically, sure.

The snaps and debs we're talking about here are all GUI applications, so it's not too unrealistic, I think, to expect that they be updated via a GUI tool such as update-manager. Headless systems need not care about these migrations anyway.

And yes, we are 100% committed to ensuring that update-manager knows how to handle all necessary migrations going forward.


There's nothing planned for any other solution at this time.

Jonathan Kamens (jik) said : #4

Thank you!

Naël (nathanael-naeri) said : #5

Thanks a lot for the insight Marcus!

Naël (nathanael-naeri) said : #6

Thanks Marcus Tomlinson, that solved my question.