4 ms·
I understand how and where they are installed. The question is, when 2 packages, pkgA & pkgB bring in the same library, call it "thelib.so" into the system, lo
by usrbinbash 5y ago
I understand how and where they are installed.
The question is, when 2 packages, pkgA & pkgB bring in the same library, call it "thelib.so" into the system, logically, only 1 of them can be refered to by the symlink in System/Index/lib.
So we have both
/Programs/pkgA/1.0/lib/thelib.so
/Programs/pkgB/1.0/lib/thelib.so
And lets say the symlink points to the file of pkgA:
/System/Index/lib/thelib.so -> /Programs/pkgA/1.0/lib/thelib.so
What happens now if I remove pkgA? If nothing changes, the symlink would be dangling, and pkgB would no longer function because the libraries are looked up in the index.
My question is: how is the pkg management system resolving this?
- infogulch 5y agoAh so basically how does it track dependencies? Good question. Browsing the wiki it looks like its basically manual :/ but I could be mistaken. https://github.com/gobolinux/Documentation/wiki/Removing-programs https://github.com/gobolinux/Documentation/wiki/Removing-pro... https://github.com/gobolinux/Documentation/wiki/Understanding-and-maintaining-system-indices https://github.com/gobolinux/Documentation/wiki/Understandin...
- infogulch 5y agoI explained it because your example makes me think you don't understand how and where packages are installed. Libraries are installed independently, but your example looks like the library thelib.so is installed inside pkgA which is only related to thelib.so because pkgA is the first package that depends on thelib.so, but this is incorrect, instead you'd have: /System/Index/lib/thelib.so -> /Programs/thelib/1.0/thelib.so And /Programs/pkgA/lib/thelib.so would never exist at all.
- kllrnohj 5y agoThe same way any existing package management system handles this - by only allowing you to install one of the two packages in the first place. But Gobolinux can actually handle this scenario better than most distros since package-specific libraries don't need to go into the global index in the first place. So neither pkgA nor pkgB's 'thelib.so' would end up in the index, it'd just be local to the package.
- Fnoord 5y agoExcept Nix. Each package has a unique hash, which is reproducible. So if there is one minor difference, you get a different path. This works incredibly well, but I admit the paths of Gobolinux are more user-friendly in their naming scheme (though one might argue against a capital letter at start of each entry due to increased finger movement requirement).