All in overlay_fs.rs::copy_to_upper, all untested, all hit by ordinary pip install/mv on a conda env:
- Symlinks are copied up as empty regular files — only
Directory is special-cased; a symlink's content_source returns ENOENT, falls to read (returns vec![] for symlinks), and fs::write creates a 0-byte file that permanently shadows the link. Conda envs are full of libfoo.so → libfoo.so.1.
- Directory rename loses lower children — the
upper_path.exists() early-return fires before the directory-recursion check, so a partially-materialized dir isn't recursed; renaming it drops any lower-only children, then a whiteout hides the originals.
- Exec bit dropped on copy-up —
fs::write creates 0644 with no permission copy, so chmod/mv/truncate on bin/python yields a non-executable copy.
All in
overlay_fs.rs::copy_to_upper, all untested, all hit by ordinarypip install/mvon a conda env:Directoryis special-cased; a symlink'scontent_sourcereturns ENOENT, falls toread(returnsvec![]for symlinks), andfs::writecreates a 0-byte file that permanently shadows the link. Conda envs are full oflibfoo.so → libfoo.so.1.upper_path.exists()early-return fires before the directory-recursion check, so a partially-materialized dir isn't recursed; renaming it drops any lower-only children, then a whiteout hides the originals.fs::writecreates 0644 with no permission copy, sochmod/mv/truncate onbin/pythonyields a non-executable copy.