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>
This commit is contained in:
parent
876ec52215
commit
e7f45d333f
@ -284,7 +284,7 @@ def copytree(src, dest, preserve=True):
|
|||||||
If preserve is False, uses cp -R (useful for modeless filesystems)
|
If preserve is False, uses cp -R (useful for modeless filesystems)
|
||||||
raises CalledProcessError if copy fails.'''
|
raises CalledProcessError if copy fails.'''
|
||||||
logger.debug("copytree %s %s", src, dest)
|
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)]
|
cp += [join(src, "."), os.path.abspath(dest)]
|
||||||
runcmd(cp)
|
runcmd(cp)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user