by infogulch · 4y ago · 0 comments
~] ls -l /System/Index/lib
libgtk.so -> /Programs/GTK+/1.2.10/lib/libgtk-1.2.so.0.9.1
libgtk-1.2.so.0 -> /Programs/GTK+/1.2.10/lib/libgtk-1.2.so.0.9.1
libgtk-1.2.so.0.9.1 -> /Programs/GTK+/1.2.10/lib/libgtk-1.2.so.0.9.1
Also: ~] cat /etc/ld.so.conf
/System/Index/lib
I guess it's up to the package manager or application to reference the version of the library at the correct specificity. And then it's up to the package manager to GC libs that aren't referenced anymore.Personally I think it would have been interesting to version the system index itself, like /System/Index/Current|1.0|myappenv|etc/lib|bin|etc, and each app is chrooted into their own system index by default.
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?
/System/Index/lib/thelib.so -> /Programs/thelib/1.0/thelib.so
And /Programs/pkgA/lib/thelib.so would never exist at all.https://github.com/gobolinux/Documentation/wiki/Removing-pro...
https://github.com/gobolinux/Documentation/wiki/Understandin...
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.