#3661 made python_repository write __pycache__ symlinks with targets that escape Bazel. Since the repository sets reproducible = True, these links get stored in the repository contents cache and shared. This can lead to surprises, as the symlink target validity varies by host system.
The recommended opt-out procedure is to set RULES_PYTHON_PYCACHE_DIR=/dev/null. But this winds up littering the repository cache with a bunch of symlinks to a character device, which, when processed by tar.bzl, become literal character devices and prevent any py_binary being packaged into a tar layer.
There should be a way to completely disable the #3661 functionality and get a repository without any __pycache__ symlinks at all.
#3661 made
python_repositorywrite__pycache__symlinks with targets that escape Bazel. Since the repository setsreproducible = True, these links get stored in the repository contents cache and shared. This can lead to surprises, as the symlink target validity varies by host system.The recommended opt-out procedure is to set
RULES_PYTHON_PYCACHE_DIR=/dev/null. But this winds up littering the repository cache with a bunch of symlinks to a character device, which, when processed bytar.bzl, become literal character devices and prevent anypy_binarybeing packaged into a tar layer.There should be a way to completely disable the #3661 functionality and get a repository without any
__pycache__symlinks at all.