‘copy-recursively’ #:keep-mtime? #t broken for directories

  • Done
  • quality assurance status badge
Details
One participant
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal

Debbugs page

L
L
Ludovic Courtès wrote on 19 Nov 2020 08:19
(address . bug-guix@gnu.org)
87mtzdgvyq.fsf@inria.fr
When passing #:keep-mtime? #t to ‘copy-recursively’, the mtime of
regular files is preserved, but the mtime of directories (and symlinks)
is not.

This is because ‘set-file-time’ is called in the ‘down’ procedure of
‘file-system-fold’, before the directory is populated.

‘populate-store’ is affected by this bug, meaning that it creates stores
where directories have “wrong” timestamps. In practice this is probably
less likely to have undesirable side effects than regular files with
wrong timestamps (think ‘make’, .go files, etc.)

Ludo’.
L
L
Ludovic Courtès wrote on 19 Nov 2020 13:40
(address . 44741@debbugs.gnu.org)
87ima1gh53.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (7 lines)
> When passing #:keep-mtime? #t to ‘copy-recursively’, the mtime of
> regular files is preserved, but the mtime of directories (and symlinks)
> is not.
>
> This is because ‘set-file-time’ is called in the ‘down’ procedure of
> ‘file-system-fold’, before the directory is populated.

Fixed by 201cbcac3e9c23cc28352fa9ece3e677e22cc12c (core-updates).

Toggle quote (5 lines)
> ‘populate-store’ is affected by this bug, meaning that it creates stores
> where directories have “wrong” timestamps. In practice this is probably
> less likely to have undesirable side effects than regular files with
> wrong timestamps (think ‘make’, .go files, etc.)

In some cases, such as the initrd, the problem is harmless because
timestamps are reset anyway in the archive (for instance
‘write-cpio-archive’ does that.)

There might be problems in other cases, such as (gnu build image).

Ludo’.
L
L
Ludovic Courtès wrote on 3 Dec 2020 09:06
control message for bug #44741
(address . control@debbugs.gnu.org)
874kl2ddkq.fsf@gnu.org
tags 44741 fixed
close 44741
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 44741@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 44741
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch