[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/07: offload: Drop 'remote-pipe'.
From: |
Ludovic Courtès |
Subject: |
07/07: offload: Drop 'remote-pipe'. |
Date: |
Fri, 25 Nov 2016 22:45:44 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit bc1ad4e334fbf5239ed8d617751e9fa7dbe0ab23
Author: Ludovic Courtès <address@hidden>
Date: Fri Nov 25 22:47:37 2016 +0100
offload: Drop 'remote-pipe'.
* guix/scripts/offload.scm (remote-pipe): Remove.
(machine-load): Use 'open-remote-pipe*' instead of 'remote-pipe'.
---
guix/scripts/offload.scm | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 1821bb5..2e02680 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -249,26 +249,6 @@ an SSH session. Return a <nix-server> object."
(object->string redirect)))))
(open-connection #:port channel)))
-(define* (remote-pipe session command
- #:key (quote? #t))
- "Run COMMAND (a list) on SESSION, and return an open input/output port,
-which is also an SSH channel. When QUOTE? is true, perform shell-quotation of
-all the elements of COMMAND."
- (define (shell-quote str)
- ;; Sort-of shell-quote STR so it can be passed as an argument to the
- ;; shell.
- (with-output-to-string
- (lambda ()
- (write str))))
-
- (let* ((channel (make-channel session)))
- (channel-open-session channel)
- (channel-request-exec channel
- (string-join (if quote?
- (map shell-quote command)
- command)))
- channel))
-
;;;
;;; Synchronization.
@@ -511,7 +491,8 @@ be read."
"Return the load of MACHINE, divided by the number of parallel builds
allowed on MACHINE."
(let* ((session (open-ssh-session machine))
- (pipe (remote-pipe session '("cat" "/proc/loadavg")))
+ (pipe (open-remote-pipe* session OPEN_READ
+ "cat" "/proc/loadavg"))
(line (read-line pipe)))
(close-port pipe)
- branch master updated (7276b56 -> bc1ad4e), Ludovic Courtès, 2016/11/25
- 04/07: store: 'open-connection' can taken an open port., Ludovic Courtès, 2016/11/25
- 05/07: offload: Remove 'with-nar-error-handling' macro., Ludovic Courtès, 2016/11/25
- 07/07: offload: Drop 'remote-pipe'.,
Ludovic Courtès <=
- 01/07: gnu: guile-ssh: Update to 0.10.2., Ludovic Courtès, 2016/11/25
- 03/07: offload: Reuse SSH session during 'transfer-and-offload'., Ludovic Courtès, 2016/11/25
- 02/07: offload: Use Guile-SSH instead of GNU lsh., Ludovic Courtès, 2016/11/25
- 06/07: offload: Rewrite to make direct RPCs to the remote daemon., Ludovic Courtès, 2016/11/25