You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: layer.md
+11-13Lines changed: 11 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,31 +204,29 @@ The resulting tar archive for `rootfs-c9d-v1.s1` has the following entries:
204
204
./etc/.wh.my-app-config
205
205
```
206
206
207
-
Where the basename name of`./etc/my-app-config`is now prefixed with `.wh.`, and will therefore be removed when the changeset is applied.
207
+
To signify that the resource`./etc/my-app-config`MUST be removed when the changeset is applied, the basename of the entry is prefixed with `.wh.`.
208
208
209
-
## Applying
209
+
## Applying Changesets
210
210
211
-
Layer Changesets of [mediatype](./media-types.md)`application/vnd.oci.image.layer.v1.tar+gzip` are applied rather than strictly extracted in normal fashion for tar archives.
211
+
Layer Changesets of [mediatype](./media-types.md)`application/vnd.oci.image.layer.v1.tar+gzip` are _applied_, rather than simply extracted as tar archives.
212
212
213
-
Applying a layer changeset requires consideration for the [whiteout](#whiteouts) files.
214
-
In the absence of any [whiteout](#whiteouts) files in a layer changeset, the archive is extracted like a regular tar archive.
213
+
Applying a layer changeset requires special consideration for the [whiteout](#whiteouts) files.
215
214
215
+
In the absence of any [whiteout](#whiteouts) files in a layer changeset, the archive is extracted like a regular tar archive.
216
216
217
217
### Changeset over existing files
218
218
219
-
This section covers applying an entry in a layer changeset, if the file path already exists.
219
+
This section specifies applying an entry from a layer changeset if the target path already exists.
220
220
221
-
If the file path is a directory, then the existing path just has it's attribute set from the layer changeset for that filepath.
222
-
If the file path is any other file type (regular file, FIFO, etc), then the:
223
-
* file path is unlinked (See [`unlink(2)`](http://linux.die.net/man/2/unlink))
224
-
* create the file
225
-
* If a regular file then content written.
226
-
* set attributes on the filepath
221
+
If the entry and the existing path are both directories, then the existing path's attributes MUST be replaced by those of the entry in the changeset.
222
+
In all other cases, the implementation MUST do the semantic equivalent of the following:
223
+
- removing the file path (e.g. [`unlink(2)`](http://linux.die.net/man/2/unlink) on Linux systems)
224
+
- recreating the file path, based on the contents and attributes of the changeset entry
227
225
228
226
## Whiteouts
229
227
230
228
A whiteout file is an empty file with a special filename that signifies a path should be deleted.
231
-
A whiteout filename consists of the prefix .wh. plus the basename of the path to be deleted.
229
+
A whiteout filename consists of the prefix `.wh.` plus the basename of the path to be deleted.
232
230
As files prefixed with `.wh.` are special whiteout markers, it is not possible to create a filesystem which has a file or directory with a name beginning with `.wh.`.
233
231
234
232
Once a whiteout is applied, the whiteout itself MUST also be hidden.
0 commit comments