[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: ssh: 'send-files' reports missing modules on the remote host.
From: |
guix-commits |
Subject: |
01/08: ssh: 'send-files' reports missing modules on the remote host. |
Date: |
Mon, 23 Mar 2020 05:48:32 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 8f53d73493a2949e2db28cd7d689a690b2d9479a
Author: Ludovic Courtès <address@hidden>
AuthorDate: Mon Mar 23 10:08:41 2020 +0100
ssh: 'send-files' reports missing modules on the remote host.
Reported by Mikael Djurfeldt <address@hidden>
in <https://bugs.gnu.org/40125>.
* guix/ssh.scm (send-files)[inferior-remote-eval*]: New procedure.
[missing]: Use it. Add an explicit 'resolve-module' call.
(report-inferior-exception): New procedure.
---
guix/ssh.scm | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 56b49b1..2d7ca7d 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <address@hidden>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -405,11 +405,24 @@ to the system ACL file if it has not yet been authorized."
"Send the subset of FILES from LOCAL (a local store) that's missing to
REMOTE, a remote store. When RECURSIVE? is true, send the closure of FILES.
Return the list of store items actually sent."
+ (define (inferior-remote-eval* exp session)
+ (guard (c ((inferior-exception? c)
+ (match (inferior-exception-arguments c)
+ (('quit 7)
+ (report-module-error (remote-store-host remote)))
+ (_
+ (report-inferior-exception c (remote-store-host remote))))))
+ (inferior-remote-eval exp session)))
+
;; Compute the subset of FILES missing on SESSION and send them.
(let* ((files (if recursive? (requisites local files) files))
(session (channel-get-session (store-connection-socket remote)))
- (missing (inferior-remote-eval
+ (missing (inferior-remote-eval*
`(begin
+ (eval-when (load expand eval)
+ (unless (resolve-module '(guix) #:ensure #f)
+ (exit 7)))
+
(use-modules (guix)
(srfi srfi-1) (srfi srfi-26))
@@ -567,4 +580,9 @@ own module directory. Run @command{ssh ~A env | grep
GUILE_LOAD_PATH} to
check.")
host)))
+(define (report-inferior-exception exception host)
+ "Report EXCEPTION, an &inferior-exception that occurred on HOST."
+ (raise-error (G_ "exception occurred on remote host '~A': ~s")
+ host (inferior-exception-arguments exception)))
+
;;; ssh.scm ends here
- branch master updated (1eb27d5 -> 591faab), guix-commits, 2020/03/23
- 03/08: ui: Add 'indented-string'., guix-commits, 2020/03/23
- 04/08: deploy: Show what machines will be deployed., guix-commits, 2020/03/23
- 01/08: ssh: 'send-files' reports missing modules on the remote host.,
guix-commits <=
- 02/08: machine: ssh: Make sanity checks in a single round trip., guix-commits, 2020/03/23
- 08/08: gnu: Add python-gcovr., guix-commits, 2020/03/23
- 06/08: machine: ssh: Better report missing initrd modules., guix-commits, 2020/03/23
- 07/08: gnu: Add lv2toweb., guix-commits, 2020/03/23
- 05/08: deploy: Write a message upon successful deployment., guix-commits, 2020/03/23