unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / 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

unofficial mirror of bug-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-bugs/0 guix-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-bugs guix-bugs/ https://yhetil.org/guix-bugs \
		bug-guix@gnu.org
	public-inbox-index guix-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.bugs
	nntp://news.gmane.io/gmane.comp.gnu.guix.bugs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git