[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/19: guix: register-path: reset timestamps after registering.
From: |
guix-commits |
Subject: |
07/19: guix: register-path: reset timestamps after registering. |
Date: |
Tue, 29 Jan 2019 14:19:50 -0500 (EST) |
reepca pushed a commit to branch guile-daemon
in repository guix.
commit c5929df43d18f529d8581c4f9a1003554cd2bf17
Author: Caleb Ristvedt <address@hidden>
Date: Tue Jun 6 00:04:54 2017 -0500
guix: register-path: reset timestamps after registering.
* guix/store.scm (register-path): Now resets timestamps.
---
guix/store.scm | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/guix/store.scm b/guix/store.scm
index b5aae45..e60fa16 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -52,6 +52,7 @@
#:use-module (web uri)
#:use-module (sqlite3)
#:use-module (guix store database)
+ #:use-module (gnu build install)
#:export (%daemon-socket-uri
%gc-roots-directory
%default-substitute-urls
@@ -1557,17 +1558,14 @@ makes a wrapper around a port which implements
GET-POSITION."
(values hash
size)))))
-;; TODO: make this canonicalize store items that are registered. This involves
-;; setting permissions and timestamps, I think. Also, run a "deduplication
-;; pass", whatever that involves. Also, handle databases not existing yet
-;; (what should the default behavior be? Figuring out how the C++ stuff
-;; currently does it sounds like a lot of grepping for global
-;; variables...). Also, return #t on success like the documentation says we
-;; should.
+;; TODO: Run a "deduplication pass", whatever that involves. Also, handle
+;; databases not existing yet (what should the default behavior be? Figuring
+;; out how the C++ stuff currently does it sounds like a lot of grepping for
+;; global variables...). Also, return #t on success like the documentation
+;; says we should.
(define* (register-path path
- #:key (references '()) deriver prefix
- state-directory)
+ #:key (references '()) deriver prefix state-directory)
;; Priority for options: first what is given, then environment variables,
;; then defaults. %state-directory, %store-directory, and
;; %store-database-directory already handle the "environment variables /
@@ -1617,7 +1615,13 @@ be used internally by the daemon's build hook."
#:deriver deriver
#:hash (string-append "sha256:"
(bytevector->base16-string hash))
- #:nar-size nar-size))))
+ #:nar-size nar-size)
+ ;; reset-timestamps prints a message on each invocation that we probably
+ ;; don't want.
+ (with-output-to-port
+ (%make-void-port "w")
+ (lambda ()
+ (reset-timestamps real-path))))))
;;;
- branch guile-daemon created (now 10b0562), guix-commits, 2019/01/29
- 07/19: guix: register-path: reset timestamps after registering.,
guix-commits <=
- 01/19: patches: honor NIX_STORE in site.py., guix-commits, 2019/01/29
- 04/19: .dir-locals.el: properly indent sql macros., guix-commits, 2019/01/29
- 08/19: guix: register-path: do deduplication., guix-commits, 2019/01/29
- 12/19: linux-container: new use-output argument., guix-commits, 2019/01/29
- 02/19: guix: register-path: Implement prototype in scheme., guix-commits, 2019/01/29
- 05/19: guix: sql.scm: split into generic and store-specific parts., guix-commits, 2019/01/29
- 09/19: guix: register-path: return #t on success., guix-commits, 2019/01/29
- 03/19: guix: register-path: Honor environment variables., guix-commits, 2019/01/29
- 06/19: guix: register-path: use new %store-database-directory, guix-commits, 2019/01/29
- 10/19: guix: register-path: use new %store-database-directory, guix-commits, 2019/01/29