I’m building my own distribution, and as a part of that a package manager. I’d like to do something unique, where inside the package manager’s “store”, you can have multiple package versions; like Nix or Guix. You should be able to flip between them at a fly with something like Debian/Suse/Fedora/etc’s
update-alternative's tool, and call ones besides the primary ones.
My question is; how do these systems work? Specifically how do they handle dependencies?
firstname.lastname@example.org depends on email@example.com
firstname.lastname@example.org depends on email@example.com
firstname.lastname@example.org depends on email@example.com
so firstname.lastname@example.org is the default version. no issue, it depends on email@example.com like firstname.lastname@example.org however, now the user wants to do
update-alternatives email@example.com. so we have to roll back bar to 1.0, but this breaks firstname.lastname@example.org. Or. the user wants to run email@example.com while keeping 2.0 as the default. I guess you could do tomfoolery with PATH and LD_LIBRARY_PATH, but I’m guessing that’s not what those distributions do. Also guessing they don’t use a chroot. I’d love some insight into this