[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-dev: 'unpack' phase does not seem to preserve timestamps
From: |
Ludovic Courtès |
Subject: |
Re: emacs-dev: 'unpack' phase does not seem to preserve timestamps |
Date: |
Wed, 23 May 2018 17:01:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Pierre Neidhardt <address@hidden> skribis:
> Since all file timestamps are set to Epoch by 'unpack', the build phase
> tries to rebuild everything.
> And since the files unpacked to "source" are read-only, `make` fails to
> regenerate the files that go in "source".
Yes, that’s annoying, but that’s expected. Perhaps the ‘unpack’
phase could automatically make the copy that it creates with
‘copy-recursively’ writable?
> From the source, 'unpack' is supposed to preserve the timestamp:
>
> (define* (unpack #:key source #:allow-other-keys)
> "Unpack SOURCE in the working directory, and change directory within the
> source. When SOURCE is a directory, copy it in a sub-directory of the current
> working directory."
> (if (file-is-directory? source)
> (begin
> (mkdir "source")
> (chdir "source")
>
> ;; Preserve timestamps (set to the Epoch) on the copied tree so that
> ;; things work deterministically.
> (copy-recursively source "."
> #:keep-mtime? #t)
It does preserve timestamps, but since SOURCE is in the store, its
timestamps are all set to the Epoch.
But that’s OK: Git doesn’t specify timestamps anyway.
Thanks,
Ludo’.