I recently installed the PolyMC package(org.polymc.PolyMC) it is a minecraft client.
Minecraft itself uses java, one of the things i noticed however that the package size is huge, not because of the size of the application in itself, but because it uses the OpenJDK17 and 8 extensions(for newer and older versions of the game). I would expect Java itself stored separately but it does not seem to be the case.
This also means that every time java gets updated it shows up as an application update and not as a java update.
Does that mean that for every application using the OpenJDK extension i have multiple Java same runtimes stored on my system? And that they all have to update separately?
Yes that is exactly what that means. Each flatpak package bundles it’s own dependencies and in this case they’re copied from a SDK extension into the package.
Right the OSTree dedup is great! An update is still required for the package that uses it right? Or are packages automatically rebuild as soon as an SDK extension is updated? I can totally imagine an update of an extension going unnoticed for quite some time.
I think you posted the wrong link as this points to an askubuntu question about the difference between upstream and downstream.
From what I understand all unique files used by OSTree are stored only once and are probably identified by their hash. The hashes are used by Flatpak to indicate which files belong to a package and are then hard linked to compose the filesystem required to run the application (Under the Hood - Flatpak documentation). So far so good, however:
this is correct and I haven’t seen anything to indicate that all packages that require an SDK extension are automatically rebuild if the SDK extension is updated. So even though there is deduplication using OSTree, that is just based on the hashes of the files and if no rebuilds are triggered you might well have multiple (minor and/or micro) versions of binaries produced by the SDK extension in the filesystem if one package is updated, but another is not.