Hacker News new | ask | show | jobs
by potatoalienof13 1637 days ago
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.
1 comments

I think GP was asking what happens when you remove a package that has thelib.so as a dependency. Is thelib.so removed? Does the previous existing thelib.so used as a replacement?
With any normal package manager, no. You don't remove a package that has any remaining 'reverse dependencies' (a.k.a 'dependents'). Removing only one of many dependent packages just has no effect on the dependency.
But if BOTH packA & packB come with the same libs, one of them HAS TO get symlinked in the system index. And they do not depend on one another, as each has to bring the same lib to the system, so logically, they can both be removed without breaking a dependency.

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?

This seems completely backwards, is it not that packA and packB have symlinks to the system index?
I think it may not be handled automatically.

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.

This is strange, you’ve asked the same question repeatedly and had multiple answers

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

Why would two different packages have the same library in them? Surely for every library there's a single package for that library, and if multiple applications depend on that library then their packages would depend on that package.