As far as I can tell, the package manager handles dependencies, like most other package managers. Packages can declare dependencies on other packages, and the package manager installs each dependency only once globally.
But since there can be only ne symlink to the library (because the lib is searched by name in the index) the question remains: How is the package manager handling this for Gobolinux?
Looks like you could use
find /System/Index | RemoveBroken
and then you'd have to use SymlinkProgram to enable another provider of the shared libraries.In a way this is inside-out from what Nix and Guix do, where their equivalent of the System Index (the Nix/Guix store) is the build target, and everything all symlinks point to that. That makes this kind of thing a little easier to deal with, at some other costs.
From the answers There is no package comes with a dependency, there is a pkg depends on a well dependency
Either you are asking a deeper question or comes with a dependency is an unusual terminology