[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/08: store: 'register-path' no longer swallows 'system-error' exceptio
From: |
Ludovic Courtès |
Subject: |
02/08: store: 'register-path' no longer swallows 'system-error' exceptions. |
Date: |
Sun, 19 Jun 2016 22:53:14 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit 95fa173ed12b832315d119d635b85813bb5317bd
Author: Ludovic Courtès <address@hidden>
Date: Sun Jun 19 21:29:43 2016 +0200
store: 'register-path' no longer swallows 'system-error' exceptions.
* guix/store.scm (register-path): Do not catch 'system-error'.
---
guix/store.scm | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/guix/store.scm b/guix/store.scm
index a640166..276684e 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1061,24 +1061,19 @@ Return #t on success.
Use with care as it directly modifies the store! This is primarily meant to
be used internally by the daemon's build hook."
;; Currently this is implemented by calling out to the fine C++ blob.
- (catch 'system-error
- (lambda ()
- (let ((pipe (apply open-pipe* OPEN_WRITE %guix-register-program
- `(,@(if prefix
- `("--prefix" ,prefix)
- '())
- ,@(if state-directory
- `("--state-directory" ,state-directory)
- '())))))
- (and pipe
- (begin
- (format pipe "~a~%~a~%~a~%"
- path (or deriver "") (length references))
- (for-each (cut format pipe "~a~%" <>) references)
- (zero? (close-pipe pipe))))))
- (lambda args
- ;; Failed to run %GUIX-REGISTER-PROGRAM.
- #f)))
+ (let ((pipe (apply open-pipe* OPEN_WRITE %guix-register-program
+ `(,@(if prefix
+ `("--prefix" ,prefix)
+ '())
+ ,@(if state-directory
+ `("--state-directory" ,state-directory)
+ '())))))
+ (and pipe
+ (begin
+ (format pipe "~a~%~a~%~a~%"
+ path (or deriver "") (length references))
+ (for-each (cut format pipe "~a~%" <>) references)
+ (zero? (close-pipe pipe))))))
;;;
- branch master updated (3ebba94 -> ca7a68e), Ludovic Courtès, 2016/06/19
- 01/08: services: Add 'gc-root-service-type'., Ludovic Courtès, 2016/06/19
- 08/08: tests: Fix list of exports in (gnu tests)., Ludovic Courtès, 2016/06/19
- 02/08: store: 'register-path' no longer swallows 'system-error' exceptions.,
Ludovic Courtès <=
- 04/08: utils: 'current-source-directory' gracefully handles lack of source info., Ludovic Courtès, 2016/06/19
- 06/08: tests: Strengthen regexp in 'packages.scm'., Ludovic Courtès, 2016/06/19
- 07/08: tests: Export 'run-basic-test'., Ludovic Courtès, 2016/06/19
- 05/08: gnu: guix: Add 'current-guix' thunk., Ludovic Courtès, 2016/06/19
- 03/08: utils: 'current-source-directory' resolves relative file names at run time., Ludovic Courtès, 2016/06/19