Do not resolve or mangle symlinks during staging
Resolving symlinks during staging causes various issues:
-
Split rules may not work properly as the resolved paths will differ depending on whether another artifact with a directory symlink has been staged in the same root directory or not, e.g., as part of compose.
-
The order of symlinks in file lists is difficult to get right to guarantee consistent and predictable behavior as paths in a file list might rely on symlinks in the same file list. See #647 (closed) and #817 (closed).
-
Staging order differences can lead to surprising results. See #390 (closed).
-
Difficult to properly support absolute symlinks. Absolute symlinks are currently converted to relative symlinks, however, this doesn't always work. See #606 (closed) and #830 (closed).
This will require changes in projects that rely on the current behavior. However, the changes are expected to be small and are often a sign of buggy element files. E.g., elements that don't fully obey bindir
or sbindir
variables.
This depends on !1139 (merged).
-
Do not resolve symlinks in utils._ensure_real_directory()
-
Match utils.py
behavior in_casbaseddirectory.py
-
Do not mangle absolute symlinks -
Update storage_vdir_import.py