lib/checkout: For "process whiteouts" mode, replace directories too
I'm playing around with some ostree ⇔ OCI/Docker bits, and ran into this while importing an OCI image that built from the Fedora base image where `/home` is a regular directory, and I added a layer that did the ostree bits of moving it to `/var` and leaving a symlink. OCI/Docker supports this. Now since "process whiteouts" is really the "enable OCI/Docker" mode, let's only replace dirs if that's enabled. This leaves the `UNION_FILES` targeted for its original use case which is unioning components/packages. (Although that use case itself is now a bit superceded by `UNION_IDENTICAL`, but eh). Closes: #1294 Approved by: jlebon
This commit is contained in:
1 parent
9166605e5a
commit
b8251d26bd
3 files changed
+53
-5
No files matched your search
@@ -848,7 +848,7 @@ typedef enum {
|
||||
/**
|
||||
* OstreeRepoCheckoutOverwriteMode:
|
||||
* @OSTREE_REPO_CHECKOUT_OVERWRITE_NONE: No special options
|
||||
* @OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES: When layering checkouts, unlink() and replace existing files, but do not modify existing directories
|
||||
* @OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_FILES: When layering checkouts, unlink() and replace existing files, but do not modify existing directories (unless whiteouts are enabled, then directories are replaced)
|
||||
* @OSTREE_REPO_CHECKOUT_OVERWRITE_ADD_FILES: Only add new files/directories
|
||||
* @OSTREE_REPO_CHECKOUT_OVERWRITE_UNION_IDENTICAL: Like UNION_FILES, but error if files are not identical (requires hardlink checkouts)
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user