Union file deletion using whiteouts

Hello.

In the current beta (beta release 1.51.0-124-ge569977c), when you try to delete a file from a union, it will try to delete the file from whichever upstream contains the file, even if the upstream is read-only. In the current stable release it will even delete files from upstreams that are explicitly stated in the docs to be read-only.

It would be great to support something similar to unionfs's whiteout feature, where a file is created in a read-write upstream that notes to unionfs that the corresponding read-only file should not be displayed. This would allow deleting from read-only upstreams without actually modifying them.

My personal usecase is generating "patches" between two different directories containing only the changed files, and I'd like to be able to pick out whiteout files to generate a list of all deleted files to include in the same patch.

What happens, does it try to delete the file and fail? That is what I'm hoping!

The b2 backend calls the feature you are after a "delete marker"

@Max-Sum what do you think?

Yes, with the in-beta version of union, it does fail with a "permission denied" error.

However, on a somewhat related note, in the old union implementation (in the current stable release), it actually succeeds at deleting files in read-only remotes (AKA remotes other than the last one).

That is good

That is bad! It should be fixed soon though when I release 1.52

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.