[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/09: guix: register-path: reset timestamps after registering.
From: |
Caleb Ristvedt |
Subject: |
06/09: guix: register-path: reset timestamps after registering. |
Date: |
Mon, 12 Jun 2017 03:05:06 -0400 (EDT) |
reepca pushed a commit to branch guile-daemon
in repository guix.
commit 374281f52e177c3be729c0a24aa29a4f17dde851
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 77fd5b5..cf08da6 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -45,6 +45,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
@@ -1245,17 +1246,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 /
@@ -1305,7 +1303,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 a647f6e), Caleb Ristvedt, 2017/06/12
- 04/09: guix: sql.scm: split into generic and store-specific parts., Caleb Ristvedt, 2017/06/12
- 08/09: guix: register-path: return #t on success., Caleb Ristvedt, 2017/06/12
- 06/09: guix: register-path: reset timestamps after registering.,
Caleb Ristvedt <=
- 01/09: guix: register-path: Implement prototype in scheme., Caleb Ristvedt, 2017/06/12
- 05/09: guix: register-path: use new %store-database-directory, Caleb Ristvedt, 2017/06/12
- 03/09: .dir-locals.el: properly indent sql macros., Caleb Ristvedt, 2017/06/12
- 07/09: guix: register-path: do deduplication., Caleb Ristvedt, 2017/06/12
- 09/09: deduplication: new module., Caleb Ristvedt, 2017/06/12
- 02/09: guix: register-path: Honor environment variables., Caleb Ristvedt, 2017/06/12