aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-01-23 17:01:07 -0500
committerMark H Weaver <mhw@netris.org>2018-01-23 17:01:07 -0500
commita102d359a68ce7219a1880e47dd6f9332cbbce3a (patch)
treed879e718f08d776ad84c456c91a349e59941d1f2 /guix
parent07b8ea841e1e2eda5b367f35cf68d23d0520cc4d (diff)
parentf3a13a21e50fa3751fc39e5768ea6843bfc19df2 (diff)
downloadgnu-guix-a102d359a68ce7219a1880e47dd6f9332cbbce3a.tar
gnu-guix-a102d359a68ce7219a1880e47dd6f9332cbbce3a.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/publish.scm16
-rw-r--r--guix/scripts/system.scm6
2 files changed, 13 insertions, 9 deletions
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index 1673fb9f33..b5dfdab32f 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -672,10 +672,10 @@ example: \"/foo/bar\" yields '(\"foo\" \"bar\")."
exp ...)
(const #f)))
-(define (nar-response-port response)
+(define (nar-response-port response compression)
"Return a port on which to write the body of RESPONSE, the response of a
/nar request, according to COMPRESSION."
- (match (assoc-ref (response-headers response) 'x-nar-compression)
+ (match compression
(($ <compression> 'gzip level)
;; Note: We cannot used chunked encoding here because
;; 'make-gzip-output-port' wants a file port.
@@ -697,11 +697,13 @@ blocking."
(call-with-new-thread
(lambda ()
(set-thread-name "publish nar")
- (let* ((response (write-response (sans-content-length response)
- client))
- (port (begin
- (force-output client)
- (nar-response-port response))))
+ (let* ((compression (assoc-ref (response-headers response)
+ 'x-nar-compression))
+ (response (write-response (sans-content-length response)
+ client))
+ (port (begin
+ (force-output client)
+ (nar-response-port response compression))))
;; XXX: Given our ugly workaround for <http://bugs.gnu.org/21093> in
;; 'render-nar', BODY here is just the file name of the store item.
;; We call 'write-file' from here because we know that's the only
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 55a02fb96d..999ffb010b 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016, 2017 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -331,7 +331,9 @@ bring the system down."
(let ((to-load-names (map shepherd-service-canonical-name to-load))
(to-start (filter shepherd-service-auto-start? to-load)))
(info (G_ "loading new services:~{ ~a~}...~%") to-load-names)
- (mlet %store-monad ((files (mapm %store-monad shepherd-service-file
+ (mlet %store-monad ((files (mapm %store-monad
+ (compose lower-object
+ shepherd-service-file)
to-load)))
;; Here we assume that FILES are exactly those that were computed
;; as part of the derivation that built OS, which is normally the