When I implemented https://github.com/brainvisa/casa-distro/pull/329 I used /host to prefix the linked directories, which has the benefit of working in all cases inside the container, but it results in symbolic links that have no sense on the host, where /host does not exist.
The symlinks still work in the container, but they may puzzle people who look in ~/.local/share/casa-distro/<directory>/home.
A tidier solution would be to use a path that is valid both on the host and in the container, e.g.
/casa/home/.anatomist -> /home/$USER/.anatomist
However, we cannot assume that the host $HOME is always in a bind-mounted directory (/home, /volatile...), so we have to check at link creation time if that is the case, and resort to /host as a fallback.
When I implemented https://github.com/brainvisa/casa-distro/pull/329 I used
/host
to prefix the linked directories, which has the benefit of working in all cases inside the container, but it results in symbolic links that have no sense on the host, where/host
does not exist./casa/home/.anatomist
->/host/home/$USER/.anatomist
The symlinks still work in the container, but they may puzzle people who look in
~/.local/share/casa-distro/<directory>/home
. A tidier solution would be to use a path that is valid both on the host and in the container, e.g./casa/home/.anatomist
->/home/$USER/.anatomist
However, we cannot assume that the host
$HOME
is always in a bind-mounted directory (/home
,/volatile
...), so we have to check at link creation time if that is the case, and resort to/host
as a fallback.