Flatpak: Use runtime extensions instead of a separate runtime?

Flatpak is great, but there are 3 problems

  1. Many apps are updated too slowly, resulting in multiple runtime versions being installed, frequently EOL ones too
  2. Some apps, including KDE apps, bundle large binaries like ffmpeg, poppler or mpv in a single app, instead of using runtime extensions for those
  3. There are 3 runtimes, FDO (Freedesktop.org), GNOME and KDE, theoretically sharing resources, but resulting in even more storage space and bandwidth usage (afaik, is that so?)

Changing 1 will be hard and needs maintainers, upstream adoption and maybe more pressure? 2 is a structural problem that could probably be solved per project.

But I wondered about 3. The FDO runtime is the main one, KDE and GNOME add libraries on top of it, which is basically a huge runtime extension. But instead, this creates a separate runtime. Does this mean that things are duplicated? If not, when does deduplication happen, already when downloading them?

If things are deduplicated, this is a non-issue. Otherwise, it seems like it would make way more sense to create a KDE FDO runtime extension and start porting apps over to FDO+extension.

In Europe and the US this might not always be an issue. But bad network connectivity happens everywhere. Also storage space of flatpaks is pretty massive, and this is a problem for mobile devices and what else is planned for adoption.

What are your thoughts on this?

Things are deduplicated, so the KDE and GNOME runtimes really only add there additions on top of the freedesktop runtime in terms of storage.
They are also deduplicated on a file level during download, so if the same file is contained in two packages / runtimes, you will only need to download it once.

As far as I know, runtime extensions can not be mandatory, making them not very useful for this purpose.

Apps being updated slowly unfortunately just needs more maintainers. Often these are apps which are not maintained very actively upstream either.
Being behind one Qt version (e.g 6.8 instead of 6.9) is sometimes done on purpose due to Qt regressions affecting that specific app (for example recently in AudioTube).

Using EOL runtimes is hopefully not common among first-party KDE apps. Obviously not all apps using the KDE runtime are actually published by KDE.

2 Likes

Thanks! If that is the case, in theory there is no issue.

Now FDO, KDE and GNOME runtimes use different versioning, release times etc. Does that affect differences between files in a bad way?

pretty bad if apps cannot request runtime extensions. That would make the “big binaries dumped into all flatpaks” problem harder to solve

Well I guess a bit, but having multiple versions of the freedesktop runtime installed would also happen with extensions, as apps could only use the latest version once the extensions have been updated.

The different versioning is easy to explain:
All of these runtimes release a new version once there are changes that could break apps that have not been recompiled. For KDE, that are new Qt versions (in case apps use private APIs).

1 Like

Thanks for the explanations!