#!/bin/bash
set -e
mkdir -p /tmp/reproduce
cd /tmp/reproduce
curl -LO https://github.com/user-attachments/files/15951378/fuse-layers.zip
unzip fuse-layers.zip
cd fuse-layers
mkdir -p merged
fuse-overlayfs -o lowerdir="$(pwd)/l1:$(pwd)/l0" merged
Reproduce the bug by access files in following sequence
#!/bin/bash
# Result is as expected.
ls /tmp/reproduce/fuse-layers/merged/site-packages > /dev/null
Result is as expected.
ls /tmp/reproduce/fuse-layers/merged/site-packages/setuptools > /dev/null
Result is wrong. Beacuse there is whiteout file in l1/site-package/setuptools/.wh..wh.opq, so we should only see the file depends.cpython-38.pyc from l1. But result is config.cpython-38.pyc depends.cpython-38.pyc which are from l0
ls /tmp/reproduce/fuse-layers/merged/site-packages/setuptools/pycache
echo ''
echo 'Result is wrong. Beacuse there is whiteout file in l1/site-package/setuptools/.wh..wh.opq, so we should only see the file depends.cpython-38.pyc from l1. But result is config.cpython-38.pyc depends.cpython-38.pyc which are from l0'
Reproduce steps:
Download and prepare the layers fuse-layers.zip
Reproduce the bug by access files in following sequence
Result is as expected.
ls /tmp/reproduce/fuse-layers/merged/site-packages/setuptools > /dev/null
Result is wrong. Beacuse there is whiteout file in
l1/site-package/setuptools/.wh..wh.opq
, so we should only see the filedepends.cpython-38.pyc
froml1
. But result isconfig.cpython-38.pyc depends.cpython-38.pyc
which are froml0
ls /tmp/reproduce/fuse-layers/merged/site-packages/setuptools/pycache
echo '' echo 'Result is wrong. Beacuse there is whiteout file in
l1/site-package/setuptools/.wh..wh.opq
, so we should only see the filedepends.cpython-38.pyc
froml1
. But result isconfig.cpython-38.pyc depends.cpython-38.pyc
which are froml0
'