[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/17: guix: register-path: reset timestamps after registering.
From: |
Caleb Ristvedt |
Subject: |
06/17: guix: register-path: reset timestamps after registering. |
Date: |
Tue, 29 Aug 2017 02:07:48 -0400 (EDT) |
reepca pushed a commit to branch guile-daemon
in repository guix.
commit ade506e2d52b86908a560403aa427dc48aee0776
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 b0e0fd2..bcdb922 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
@@ -1339,17 +1340,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 /
@@ -1399,7 +1397,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 updated (f5dfbaa -> 6dee54f), Caleb Ristvedt, 2017/08/29
- 02/17: guix: register-path: Honor environment variables., Caleb Ristvedt, 2017/08/29
- 03/17: .dir-locals.el: properly indent sql macros., Caleb Ristvedt, 2017/08/29
- 04/17: guix: sql.scm: split into generic and store-specific parts., Caleb Ristvedt, 2017/08/29
- 16/17: build-derivations: Leaked environment variables more robust., Caleb Ristvedt, 2017/08/29
- 12/17: linux-container: new use-output argument., Caleb Ristvedt, 2017/08/29
- 14/17: build-derivations: initial build-group support, Caleb Ristvedt, 2017/08/29
- 07/17: guix: register-path: do deduplication., Caleb Ristvedt, 2017/08/29
- 13/17: build-derivations: use call-with-container, Caleb Ristvedt, 2017/08/29
- 09/17: deduplication: new module., Caleb Ristvedt, 2017/08/29
- 06/17: guix: register-path: reset timestamps after registering.,
Caleb Ristvedt <=
- 10/17: guix: register-path: use new %store-database-directory, Caleb Ristvedt, 2017/08/29
- 05/17: guix: register-path: use new %store-database-directory, Caleb Ristvedt, 2017/08/29
- 17/17: Merge remote-tracking branch 'origin/guile-daemon' into guile-daemon, Caleb Ristvedt, 2017/08/29
- 08/17: guix: register-path: return #t on success., Caleb Ristvedt, 2017/08/29
- 01/17: guix: register-path: Implement prototype in scheme., Caleb Ristvedt, 2017/08/29
- 15/17: linux-container: don't include /dev/ptmx or /dev/pts from host., Caleb Ristvedt, 2017/08/29
- 11/17: guix/store/build-derivations.scm: new module., Caleb Ristvedt, 2017/08/29