Use this page for questions or comments about the plans to add symlink support for Vesta.
(GregoryCzajkowski) From my understanding any absolute symlink that points outside of /vesta will continue pointing outside of vesta whether it resides in /vesta-work/$USER /vesta/ or /vesta-work/.volatile. The user has responsibility to deal with it.
There is the case when a symlink points to /nfs, during immutable it can be allowed to point to the real /nfs., while if that same symlink is than placed in a .volatile for a run_tool it should now be using the chrooted /nfs and not the real /nfs.
(KenSchalk) That's all correct. Basically Vesta will treat symlinks as strings to be copied from one place to another (e.g. from a mutable working copy to an immutable directory). It's not going to look inside them, try to figure out what they point to, or automatically manipulate them for you in any way.
Since tools always run chrooted, symlinks in a volatile directory can't be followed outside the chroot, so there's no problem with Vesta's guarantees about completeness, correctness, and repeatability.
The one place it could get confusing is if a user goes to look inside a volatile directory when using -stop-before/after-tool. Because the user's shell won't be chrooted into the volatile directory it might look to them like symlinks in the volatile directory point to a different location than the tool will see them as pointing to. I don't think there's anything we can do about this.
R = [ root = [ foo = < "bar" > ] ];
How would one go about dereferencing symlinks?
R_Deref = R/root/$(R/foo) /* ?? */
I guess there would be some primitive functions for handling symlinks?
(KenSchalk) Yes, we're going to need new primitive functions to help people deal with this. See "Primitive functions" under the section about evaluator code changes on the planning page.
Though I'm sure some people will ask for it, we're not going to change the semantics of existing SDL operators like recursive overlay (++) or binding lookup (/).
We haven't written a spec for the new primitive functions yet, but I would think that your example would work something like this:
R = [ root = [ foo = < "bar" >, bar = [ /*...*/ ] ] ]; R_Deref = _lookup_path(R/root, "/foo");