What happened - This is my problem:
For trying out if a certain snap problem still exists in a newer version of the thunderbird, i switched to the beta channel.
I forgot that thunderbird and firefox update the data in a backwards-incompatible way. So when I switched back to stable channel, i could not start thunderbird with my thunderbird profile anymore.
What I should have done - Prevention of the problem:
Probably should have snapshotted the data beforehand . Or used a different machine/profile.
But it is too late for that now.
What I want:
So, I would like to get back to stable channel as soon as a compatible thunderbird version is published there.
I cant get updates from stable for now, as it does the incompatible “downgrade”.
I cant get uncontrolled updates from beta, as I guess by the time stable becomes compatible, the beta channel will have a newer incompatible version published. Also even if there is a compatible time frame, i will probably miss it.
What I did - my approach/workaround:
I switched the thunderbird channel to stable and put the package on hold for a week. So in a week it will unhold and install from the stable channel. If stable is not compatible, thunderbird will refuse to work and I will redo the workaround (install from beta, hold it, switch to stable). Rinse and repeat.
Question: any idea how to handle this better?
Question2: I think a general subscribe-to-a-(main)-version which uses the most stable available channel would make sense for other users and would provide a better security default. Promoting/closing the channel on server side could/should trigger this I guess. Is there such functionality/where should I create a feature request?
Snapd keeps at least one backup of the old revision(s) of any updated snap. You can use
snap revert to make use of it. When using this command, versioned data folders are also returned to the point they were before the update, which in ideal cases would help prevent this problem (at the expense of e.g possibly losing history between the upgrade and downgrade).
@James-Carroll I think snap revert would not have helped in this case (that’s why I did not mention it in ‘what I should have done’). The thunderbird profile is in the commons folder, AFAICR that does not get saved, does it?
…I checked the documentation and it sais ‘User data, such as data generated by the snap and stored in a database, is often stored in a common directory and will not be reverted.’
Snapshotting and also manual backup from ~/snap/thunderbird/ would work though.
side note: even if the revert would work for a certain snap, it would not have helped in this case. I found the problem after switching back - and by refreshing instead of reverting i would have destroyed the old state. That kind of mistake one could prevent though by keeping 3 versions instead of 2 (or by remembering to always revert directly after trying something).
So still looking for a better way to handle
I was googling more and found the epochs feature. https://snapcraft.io/docs/snap-epochs
Is anybody using it and would it be usable switching channels? So if the thunderbird snap would increment the epoch every time the data becomes backwards-incompatible (and mark the updates with new-epoch*) and I would switch to a more stable channel when having a epoch not yet available in that channel, I think it should work.
…yes, looking at the table in the documentation it does exactly that, so i guess the question is solved (in the sense that there is a solution on the publishing side)