From d04d176cb41e297f45c9c30f3a8c35060ab3429d 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 (cherry picked from commit e7f45d333f03a90b826cc5b1b7db9482625f8459) --- 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 cf05bb2f..12c6d031 100644 --- a/src/pylorax/imgutils.py +++ b/src/pylorax/imgutils.py @@ -271,7 +271,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)