]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Don't preserve timestamps when copying skeleton/extra trees
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Jan 2024 09:24:45 +0000 (10:24 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 18 Jan 2024 09:24:45 +0000 (10:24 +0100)
If timestamps should be preserved, a tar archive should be used.
Timestamps in directories are very likely to be arbitrary and there's
no point in preserving them. This doesn't impact reproducible builds
as we have SourceDateEpoch= for that.

mkosi/tree.py

index be156f70797d3699559e98d55be61bc2f3270291..19afc98c8f50959df04da84411cf09a8f4290284 100644 (file)
@@ -85,7 +85,7 @@ def copy_tree(
         "cp",
         "--recursive",
         "--dereference" if dereference else "--no-dereference",
-        f"--preserve=mode,timestamps,links{',ownership,xattr' if preserve else ''}",
+        f"--preserve=mode,links{',timestamps,ownership,xattr' if preserve else ''}",
         "--reflink=auto",
         src, dst,
     ]