The snap packaging format finally frees us from dependency hell by allowing each package to have its own copy of dependencies. I'm interested in the technical details in how it does this. How does it handle:
- snaps depending on the version of a library already installed via deb packages for the current release? Does it ignore the installed library?
- different snaps specifying the same version of the same library? Does it do deduplication somehow?
- updates to core libraries that are likely to be used by a lot of snaps? OpenSSL comes to mind as a huge pain point.
xdg-app has something called a "runtime":
A fundamental concept in xdg-app is the runtime/application split. Every app depends on a runtime, which supplies the core libraries that the app relies on. Runtimes are typically shared by many applications, but a user can have multiple runtimes installed at the same time.
It seems that in the case of OpenSSL, it would be part of the runtime in xdg-apps, so an update to OpenSSL should transparently affect all xdg-apps using the same runtime.
The first two situations are handled in a clever way.
Source: http://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Snappy-Deduplication
As for the third situation, they have something similar to the runtimes that you mentioned:
Source: http://www.ubuntu.com/cloud/snappy
There is no good documentation describing frameworks yet, primarily because they seem to still be working out the boundaries of what a framework is. Here is an excerpt from their mailing list that might help clarify things.
Source: https://lists.ubuntu.com/archives/snappy-app-devel/2015-November/000442.html
I don't think that snaps check what dependencies are already installed. It just includes all of its dependencies and runtime (which is partly why the LibreOffice snap is 287 MB and the flatpak is about 200MB).
Snaps include pretty much everything the software needs to run. I don't think anything gets shared between snaps.
When a snap updates however, it will only download the dependencies that are new, and not the entire snap.
Additional clarification is in order about the way snap packaging handles shared dependencies.
This statement in one of the answers is partially true, however all installed snap packages except for the core snap depend on two packages, one of which is the core snap.
snapd - which is installed by default in 16.04 and later
core - (the core snap) which is automatically downloaded and installed when the first installed snap package is installed
All snap packages except for core itself depend on the core snap. If there is anything wrong with the core snap, then some or all of the other snaps won't work. A problem with the core snap can be fixed in the following two ways.
Update the core snap. Even if this doesn't work, the results of running the following command will provide additional information that will help solve the problem.
Uninstall the core snap and all snap packages and then reinstall them.