unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44741: ‘copy-recursively’ #:keep-mtime? #t broken for directories
@ 2020-11-19 16:19 Ludovic Courtès
  2020-11-19 21:40 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2020-11-19 16:19 UTC (permalink / raw)
  To: 44741

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’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#44741: ‘copy-recursively’ #:keep-mtime? #t broken for directories
  2020-11-19 16:19 bug#44741: ‘copy-recursively’ #:keep-mtime? #t broken for directories Ludovic Courtès
@ 2020-11-19 21:40 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-11-19 21:40 UTC (permalink / raw)
  To: 44741

Ludovic Courtès <ludo@gnu.org> skribis:

> 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).

> ‘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’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-19 21:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 16:19 bug#44741: ‘copy-recursively’ #:keep-mtime? #t broken for directories Ludovic Courtès
2020-11-19 21:40 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).