From e7f45d333f03a90b826cc5b1b7db9482625f8459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 5 Oct 2018 04:48:09 +0200 Subject: [PATCH] Preserve timestamps when building fs image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Even when FS do not support owner/modes, preserve timestamps. Signed-off-by: Marek Marczykowski-Górecki --- src/pylorax/imgutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pylorax/imgutils.py b/src/pylorax/imgutils.py index 9e88fbb3..35165f1b 100644 --- a/src/pylorax/imgutils.py +++ b/src/pylorax/imgutils.py @@ -284,7 +284,7 @@ def copytree(src, dest, preserve=True): If preserve is False, uses cp -R (useful for modeless filesystems) raises CalledProcessError if copy fails.''' logger.debug("copytree %s %s", src, dest) - cp = ["cp", "-a"] if preserve else ["cp", "-R", "-L"] + cp = ["cp", "-a"] if preserve else ["cp", "-R", "-L", "--preserve=timestamps"] cp += [join(src, "."), os.path.abspath(dest)] runcmd(cp)