I installed flatpak from the extra repo and then installed notepadqq for flatpak. All went well.
However, when I used flatpak list, it showed me a bunch of stuff I didn’t install:
Notepadqq com.notepadqq.Notepadqq 1.4.8 stable system
Mesa org.freedesktop.Platform.GL.default 24.0.6 23.08 system
Mesa (Extra) org.freedesktop.Platform.GL.default 24.0.6 23.08-extra system
nvidia-550-76 org.freedesktop.Platform.GL.nvidia-550-76 1.4 system
Intel org.freedesktop.Platform.VAAPI.Intel 23.08 system
openh264 org.freedesktop.Platform.openh264 2.1.0 2.2.0 system
Breeze GTK theme org.gtk.Gtk3theme.Breeze 6.0.4 3.22 system
KDE Application Platform org.kde.Platform 5.15-23.08 system
Did EndeavourOS install flatpak by default?
Can you explain please how KDE may use Breeze GTK theme from flatpak?
Also, how do I check if, for instance, NVIDIA drivers are installed separately and flatpak is just using them as dependency?
Or am I not getting this correctly and now they’re fully under flatpak?
I think it downloads them if the flatpak requires them and uses them over the ones on the system but I may be wrong.
As a side note there is Notepadqq in the extra repo (beta version)
Flatpaks are like a completely separate infrastructure. Even if something is installed on your system, if a flatpak needs it, it will be pulled into flatpak.
Flatpaks use the flatpaks dependencies, other packages on your system doesn’t use them.
This duplication of data is one of the downsides of using flatpaks.
As for the specific dependencies, those are defined by the application.
I remember It didn’t even weight(mb-wise) that much as these dependencies, so it must be either 1) a copy from my system or 2) a direct access to my packages. I guess it’s the first then.
However, it’s not clear to me yet:
According to their official documentation they use de-duplication.
Space efficiency: Flatpak deduplicates libraries and other files used by multiple applications to save megabytes or even gigabytes worth of storage depending on the amount of applications installed.
Seeming there are so many different opinions about it, some people saying one thing and some people saying something else I still can’t make up what side to believe but I tend to go towards that if it’s listed in the official documentation there must be truth to it.
That means there is de-duplication between flatpaks. It doesn’t help the fact that there is duplication with your repo packages and flatpaks.
Also, that de-duplication only works if the data is the same. In practice, flatpaks often use different versions of the dependencies.
To be clear, I am not saying flatpaks are good or bad. However, they definitely use more disk space than repo packages. Whether you care about that or not is a different issue.
Files shared between different flatpak packages need not be downloaded again. This is the reason why download sizes reported by flatpak install have < prepended to them, signifying that the files to be downloaded will be lesser in size depending on how many of them you already have.
This is downloaded because Notepadqq is uses the KDE runtime as its base. Refer their manifest:
A dependency which is pulled due to the KDE Runtime.
KDE runtime and SDK are based on the freedesktop runtime. Refer their manifest:
Freedesktop can optionally pull in graphics packages if needed by an application. KDE runtime and most KDE packages pull in Mesa, Intel-VAAPI and openh264 package. The manifest for Notepadqq specifies in comment that it uses OpenGL for QtWebKit. Refer:
I wouldn’t expect to see nvidia package being pulled by default unless you gave a compatible card.
The dependencies for Notepadqq on a clean system are following:
ID Branch Op Remote Download
1. org.freedesktop.Platform.GL.default 23.08 i flathub < 164.6 MB
2. org.freedesktop.Platform.GL.default 23.08-extra i flathub < 164.6 MB
3. org.freedesktop.Platform.VAAPI.Intel 23.08 i flathub < 13.4 MB
4. org.freedesktop.Platform.openh264 2.2.0 i flathub < 944.3 kB
5. org.kde.Platform.Locale 5.15-23.08 i flathub < 381.8 MB (partial)
6. org.kde.Platform 5.15-23.08 i flathub < 339.5 MB
7. com.notepadqq.Notepadqq stable i flathub < 51.1 MB
I suggest you remove unused dependencies with following command:
flatpak remove --unused
Or you can try uninstalling specifically Nvidia to see if it gives any error:
No you don’t. Similar to how when you install a package by sudo pacman -S XYZ, you don’t get to choose which dependencies to exclude, even Flatpak wouldn’t let you exclude dependencies. This isn’t a bug with either pacman or flatpak. An application needs its dependencies to run and if its pulling in extra packages, its good to inform the package maintainer. For example, Notepadqq flatpak manifest is hosted on Github and is accepting issues here:
The discussion in this topic is exactly why I recently ditched using Flatpack apps. As you eluded to, good or bad is subjective and up to the user. For me, just the extra hoops to deal with and possible concerns about duplicates and/or de-duplication between Flatpaks were just a hassle I no longer wanted to deal with.
I thought you were talking about Flatpaks to your comment which I replied to, it wasn’t clear that you were talking about both flatpaks and native packages.
Flatpak documention lacks good info about its deduplication procedure.
It uses os-tree under the hood to store files. And os-tree has a good documentation.
To answer your post:
yes, there is deduplication
deduplication is at the file level via checksum. So, even if you pull in 2 different versions of a library, the files common between them will NOT be stored again.
If APP1 had dependency LIB1.1 and APP2 had dependency on LIB1.2 (different versions of same library), one library will be downloaded in whole, while the other library will only be fetched for files changed between the two versions
os-tree cannot deduplicate files from host system itself. So even if a library exists on your host system (probably installed via Pacman), Flatpak will pull it once from Flathub to store in os-tree backend. Subsequent uses of library by other Flatpak apps won’t need to pull that library again. Howevere, the package is still duplicated once - installed by pacman and flatpak both. (I suppose this is what dalto meant)
Yes. There is lot of confusion because of the deduplication feature. Flatpak will always report space usage more than the actual usage. The simplest way to know real usage is to use du on your host system. This is exactly what the blog author does.