checkout: honor opaque checkouts

if a file ".wh..wh..opq" is present in a directory, delete anything
from lower layers that is already in that directory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1486
Approved by: cgwalters
This commit is contained in:
Giuseppe Scrivano authored and Atomic Bot committed 2018-10-26 18:26:51 +00:00
1 parent 04da47a5fb
commit 51752baf0e
2 files changed
+27 -1

No files matched your search

+2 -1
View File
@@ -1034,7 +1034,7 @@ echo "ok test error pre commit/bootid"
# Whiteouts
cd ${test_tmpdir}
mkdir -p overlay/baz/
if touch overlay/baz/.wh.cow && touch overlay/.wh.deeper; then
if touch overlay/baz/.wh.cow && touch overlay/.wh.deeper && touch overlay/baz/another/.wh..wh..opq; then
touch overlay/anewfile
mkdir overlay/anewdir/
touch overlay/anewdir/blah
@@ -1050,6 +1050,7 @@ if touch overlay/baz/.wh.cow && touch overlay/.wh.deeper; then
assert_not_has_dir overlay-co/deeper
assert_has_file overlay-co/anewdir/blah
assert_has_file overlay-co/anewfile
assert_not_has_file overlay-co/baz/another/y
# And test replacing a directory wholesale with a symlink as well as a regular file
mkdir overlay