[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/19: install: Use 'reset-timestamps' from (guix store database).
From: |
Ludovic Courtès |
Subject: |
16/19: install: Use 'reset-timestamps' from (guix store database). |
Date: |
Thu, 14 Jun 2018 05:17:10 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 078c2329c0ffc88ac8e334fcea5e025ee6410e62
Author: Ludovic Courtès <address@hidden>
Date: Thu Jun 7 22:35:36 2018 +0200
install: Use 'reset-timestamps' from (guix store database).
* gnu/build/install.scm (reset-timestamps): Remove.
* gnu/build/vm.scm: Use 'reset-timestamps' from (guix store database).
---
gnu/build/install.scm | 15 ---------------
gnu/build/vm.scm | 1 +
guix/store/database.scm | 1 -
3 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index 82eb63d..5e84cd6 100644
--- a/gnu/build/install.scm
+++ b/gnu/build/install.scm
@@ -26,7 +26,6 @@
#:export (install-boot-config
evaluate-populate-directive
populate-root-file-system
- reset-timestamps
register-closure
populate-single-profile-directory))
@@ -145,20 +144,6 @@ includes /etc, /var, /run, /bin/sh, etc., and all the
symlinks to SYSTEM."
(try))
(apply throw args)))))))
-(define (reset-timestamps directory)
- "Reset the timestamps of all the files under DIRECTORY, so that they appear
-as created and modified at the Epoch."
- (display "clearing file timestamps...\n")
- (for-each (lambda (file)
- (let ((s (lstat file)))
- ;; XXX: Guile uses libc's 'utime' function (not 'futime'), so
- ;; the timestamp of symlinks cannot be changed, and there are
- ;; symlinks here pointing to /gnu/store, which is the host,
- ;; read-only store.
- (unless (eq? (stat:type s) 'symlink)
- (utime file 0 0 0 0))))
- (find-files directory #:directories? #t)))
-
(define* (register-closure prefix closure
#:key
(deduplicate? #t) (reset-timestamps? #t)
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 37639f7..803cd59 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -25,6 +25,7 @@
#:use-module (guix build utils)
#:use-module (guix build store-copy)
#:use-module (guix build syscalls)
+ #:use-module ((guix store database) #:select (reset-timestamps))
#:use-module (gnu build linux-boot)
#:use-module (gnu build install)
#:use-module (gnu system uuid)
diff --git a/guix/store/database.scm b/guix/store/database.scm
index 3dbe527..8293845 100644
--- a/guix/store/database.scm
+++ b/guix/store/database.scm
@@ -183,7 +183,6 @@ Every store item in REFERENCES must already be registered."
;;; High-level interface.
;;;
-;; TODO: Factorize with that in (gnu build install).
(define (reset-timestamps file)
"Reset the modification time on FILE and on all the files it contains, if
it's a directory. While at it, canonicalize file permissions."
- branch master updated (03439df -> ea0a06c), Ludovic Courtès, 2018/06/14
- 04/19: build: Require Guile-SQLite3., Ludovic Courtès, 2018/06/14
- 16/19: install: Use 'reset-timestamps' from (guix store database).,
Ludovic Courtès <=
- 02/19: database: Fail registration when encountering unregistered references., Ludovic Courtès, 2018/06/14
- 08/19: database: Remove extra SQL parameter in 'update-or-insert'., Ludovic Courtès, 2018/06/14
- 05/19: database: Provide a way to specify the schema location., Ludovic Courtès, 2018/06/14
- 07/19: deduplicate: Fix a couple of thinkos., Ludovic Courtès, 2018/06/14
- 18/19: store: Remove 'register-path'., Ludovic Courtès, 2018/06/14
- 17/19: database: Allow for deterministic database construction., Ludovic Courtès, 2018/06/14
- 11/19: database: 'reset-timestamps' sets file permissions as well., Ludovic Courtès, 2018/06/14
- 03/19: store-copy: 'read-reference-graph' returns a list of records., Ludovic Courtès, 2018/06/14
- 14/19: database: 'sqlite-register' takes a database, not a file name., Ludovic Courtès, 2018/06/14
- 12/19: vm: 'expression->derivation-in-linux-vm' code can now use dlopen., Ludovic Courtès, 2018/06/14