- Jun 08, 2021
-
-
Simon McVittie authored
The nochange flag is fully implemented here: it suppresses changing the modification time or permissions. The optional flag is mostly implemented here: it suppresses the error that would ordinarily occur if a file with content does not already exist. The ignore flag is not yet implemented, only parsed, because it only really applies when verifying whether a filesystem tree matches a specification. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
time=1.234 has historically meant 1 second + 234 nanoseconds, or what normal people would write as 1.000000234. Parse it as such, but for now treat this ambiguous format as an error, unless the fractional part is exactly ".0" which is unambiguous - we can relax this to a warning later, if we want to. libarchive and FreeBSD mtree show mtimes with exactly 9 decimal digits, which makes them mean the same thing in either interpretation. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
libarchive allows both, although FreeBSD and NetBSD mtree do not. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Apr 30, 2021
-
-
Simon McVittie authored
This can be used to create directories, symlinks and zero-byte files, create files as a clone (hard-link or copy) of files in a reference directory, assert that files exist, set executable/non-executable permissions, and set files' modification times. When cloning files from a reference directory, the default is to use the same filename as the destination, but that can be overridden (for example to deal with inconvenient/non-Windows-friendly filenames). This is also actually slightly faster than pv_cheap_tree_copy(), presumably because the manifest is contiguous on-disk and the directories are not necessarily. Setting directories' modification times is implemented, but probably won't work in practice, because any files we create in the directory will alter its mtime. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-