summary refs log tree commit diff
path: root/guix/nar.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-12-09 22:16:35 +0100
committerLudovic Courtès <ludo@gnu.org>2020-12-15 17:32:09 +0100
commited7d02f7c198970ce3fe94bcee47592963326446 (patch)
tree86b9e7564dc438b17940422cec8ce3163a8a92c7 /guix/nar.scm
parent465d2cb286170933577de045e6e6dad7205bfe10 (diff)
downloadguix-ed7d02f7c198970ce3fe94bcee47592963326446.tar.gz
serialization: 'restore-file' sets canonical timestamp and permissions.
* guix/serialization.scm (restore-file): Set the permissions and mtime
of FILE.
* guix/nar.scm (finalize-store-file): Pass #:reset-timestamps? #f to
'register-items'.
* tests/nar.scm (rm-rf): Add 'chmod' calls to ensure files are writable.
("write-file + restore-file with symlinks"): Ensure every file in OUTPUT
passes 'canonical-file?'.
* tests/guix-archive.sh: Run "chmod -R +w" before "rm -rf".
Diffstat (limited to 'guix/nar.scm')
-rw-r--r--guix/nar.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/nar.scm b/guix/nar.scm
index a23af2e5de..edfcc9aab5 100644
--- a/guix/nar.scm
+++ b/guix/nar.scm
@@ -114,10 +114,12 @@ held."
           ;; Install the new TARGET.
           (rename-file source target)
 
-          ;; Register TARGET.  As a side effect, it resets the timestamps of all
-          ;; its files, recursively, and runs a deduplication pass.
+          ;; Register TARGET.  As a side effect, run a deduplication pass.
+          ;; Timestamps and permissions are already correct thanks to
+          ;; 'restore-file'.
           (register-items db
-                          (list (store-info target deriver references))))
+                          (list (store-info target deriver references))
+                          #:reset-timestamps? #f))
 
         (when lock?
           (delete-file (string-append target ".lock"))