flathub / eu.betterbird.Betterbird

https://flathub.org/apps/details/eu.betterbird.Betterbird
6 stars 0 forks source link

Install langpacks as application extensions #70

Closed mfschumann closed 1 year ago

mfschumann commented 1 year ago

Unclear migration path, because application extensions don't seem to override distribution extensions; even when the application extension has a newer version.

---- MERGE ONLY AFTER IDENTIFYING A MIGRATION PATH! ----

flathubbot commented 1 year ago

Started test build 29484

flathubbot commented 1 year ago

Build 29484 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/12147/eu.betterbird.Betterbird.flatpakref
flathubbot commented 1 year ago

Started test build 29492

flathubbot commented 1 year ago

Build 29492 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/12156/eu.betterbird.Betterbird.flatpakref
flathubbot commented 1 year ago

Started test build 30229

flathubbot commented 1 year ago

Build 30229 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/12874/eu.betterbird.Betterbird.flatpakref
flathubbot commented 1 year ago

Started test build 30503

flathubbot commented 1 year ago

Build 30503 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/13149/eu.betterbird.Betterbird.flatpakref
flathubbot commented 1 year ago

Started test build 30520

flathubbot commented 1 year ago

Build 30520 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/13166/eu.betterbird.Betterbird.flatpakref
mfschumann commented 1 year ago

The behavior does not make too much sense in a test run:

  1. Installed the flatpak with a set of langpacks.
  2. New profile 1 created: all langpacks are installed and enabled.
  3. Re-installed the flatpak with a larger set of langpacks.
  4. Profile 1 does not show the newly added langpacks. I could not find a way to install or enable them for Profile 1.

Also, in a profile where langpacks had been installed via betterbird/distribution/extensions, the newly added sideloaded langpacks either do not show up at all (similar to 4. above), or are shown as disabled without a possibility to enable them in the UI. I was able to enable those by manually setting active:true and userDisabled:false in extensions.json for them. Installed and active extensions in the user profile are not replaced by the sideloaded version (at least when they have the same version number). Maybe the behavior is different if the sideloaded version is newer than the one installed in the user profile.

Betterbird commented 1 year ago

Who know that handling distribution extensions is very difficult. From memory and all the bad experiences with Lightning, the thing is like this:

  1. Distribution extensions are only updated when the version of the host application changes. So if you add more to an existing install, they are not honoured. That would explain points 3. and 4. above.
  2. For each extension there is also a pref extensions.installedDistroAddon.<add-on ID>. If that pref is set and the add-on is disabled/removed manually, it will never come back. So I suggest to clear all those prefs.

Manipulating extensions.json doesn't appear to be a good idea. We'd have to experiment whether a new application extension supersedes an older distribution extension. IIRC, before Lightning was integrated into TB, there was discussion on whether to turn it into a system/application extension. No idea whether at that stage a migration path was discussed.

flathubbot commented 1 year ago

Started test build 31445

flathubbot commented 1 year ago

Build 31445 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/14099/eu.betterbird.Betterbird.flatpakref
mfschumann commented 1 year ago

I've done a couple of tests and found that an application extension does not replace an active distribution extension; even if the application extension has a newer version. Only after manually uninstalling the distribution extension the application extension is used. This means that users currently using a (distribution extension) langpack will be stuck on the current version if they don't manually uninstall it.

--> I will keep distributing langpacks as distribution extensions, as I don't see a migration path without user interaction from distribution to application extensions.

Betterbird commented 1 year ago

😢

Well, you can do it when we go to 115. Then all the old language packs will be incompatible and hopefully no longer override the application extensions.

Betterbird commented 1 year ago

Now is the time!