Preserve timestamps when building fs image
Even when FS do not support owner/modes, preserve timestamps.
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
(cherry picked from commit e7f45d333f
)
This commit is contained in:
parent
376eda543c
commit
d04d176cb4
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user