Hi Andy! And sorry for the late reply.
Andy Wingo <[email protected]> skribis: > What I propose is that we do something like GNU stowfs does: install the > files to a $DESTDIR, and then link them into place. The $DESTDIR would > be configurable, via dorodango's destination facility. The linked-dir > could be be the system, the user's ~/.local, or even into a specific > project. We would keep track of link mutations so that we could roll > back, possibly to a version of a file controlled by the distro's package > manager, though I don't think we'd implement that in the beginning. It > does at least allow us to detect conflicts with packages installed via > other means. Sounds like a good idea! This is roughly what Nix does: there’s the “Nix store”, which contains installed packages, and there’s the “profile”, which is a symlink forest to what’s currently installed in the user’s environment. The nice thing is that updating the symlink forest can be transactional: prepare the new symlink forest somewhere and, when you’re done, rename(2) the “current environment” symlink. And, as you say, you could keep links to previous environments, thus allowing for rollback. However, if you take that route, you’ll also need a garbage collector to reclaim installed packages not referred to by any of the environments kept around. Thanks, Ludo’. PS: FTR stowfs in practice is actually a unionfs, <https://www.gnu.org/s/hurd/hurd/translator/unionfs.html>. The rest is abstract plans. ;-)
