summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-12-01 21:49:16 +0100
committerLudovic Courtès <ludo@gnu.org>2016-12-01 23:35:10 +0100
commit0b72475301e20521e0dd9fc22881eaab4a7fe170 (patch)
tree252bb143ff5b60e5776c0ba922121dd2fb5acd47
parentf3cf860635841f2a17640d9a65e5f389d56470cd (diff)
downloadguix-0b72475301e20521e0dd9fc22881eaab4a7fe170.tar.gz
offload: Warn about the lack of zlib support.
* guix/scripts/offload.scm (guix-offload): Print a warning when
'zlib-support?' returns false.
-rw-r--r--guix/scripts/offload.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 1d60f65b16..4f6de0b7a6 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -24,6 +24,7 @@
   #:use-module (ssh popen)
   #:use-module (ssh dist)
   #:use-module (ssh dist node)
+  #:use-module (ssh version)
   #:use-module (guix config)
   #:use-module (guix records)
   #:use-module (guix store)
@@ -634,6 +635,12 @@ allowed on MACHINE."
   (and=> (passwd:dir (getpw (getuid)))
          (cut setenv "HOME" <>))
 
+  ;; We rely on protocol-level compression from libssh to optimize large data
+  ;; transfers.  Warn if it's missing.
+  (unless (zlib-support?)
+    (warning (_ "Guile-SSH lacks zlib support"))
+    (warning (_ "data transfers will *not* be compressed!")))
+
   (match args
     ((system max-silent-time print-build-trace? build-timeout)
      (let ((max-silent-time    (string->number max-silent-time))