diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-07-19 16:46:16 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-07-19 16:47:19 +0200 |
commit | 053fa76ae7bb579fe5fc9dedfc492411e6804cf0 (patch) | |
tree | 954911a5d1e748aee3b49c8d6766a110df44e165 | |
parent | 72fb1b24d904ad63a11c3850899cfd5e157b76e2 (diff) | |
download | guix-053fa76ae7bb579fe5fc9dedfc492411e6804cf0.tar guix-053fa76ae7bb579fe5fc9dedfc492411e6804cf0.tar.gz |
publish: Keep compression disabled when zlib is missing.
Reported by David Thompson.
* guix/scripts/publish.scm (%options)[--compression]: Warn if LEVEL > 0
and zlib is missing, and return RESULT.
-rw-r--r-- | guix/scripts/publish.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index 3e1ecb9d1b..3baceaf645 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -127,8 +127,14 @@ Publish ~a over HTTP.\n") %store-directory) (0 (alist-cons 'compression %no-compression result)) (level - (alist-cons 'compression (compression 'gzip level) - result))))) + (if (zlib-available?) + (alist-cons 'compression + (compression 'gzip level) + result) + (begin + (warning (_ "zlib support is missing; \ +compression disabled~%")) + result)))))) (option '("ttl") #t #f (lambda (opt name arg result) (let ((duration (string->duration arg))) |