From 4a628d57fc7956ae8a0fb167337d83ba66fe4f52 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 18 May 2017 21:19:49 +0200 Subject: publish: Fix narinfo rendering for already-compressed items. Fixes . Reported by Mark H Weaver . * guix/scripts/publish.scm (bake-narinfo+nar): Pass #f as the 2nd argument to 'stat' and properly handle #f. * tests/publish.scm (wait-for-file): New procedure. ("with cache"): Remove 'wait-for-file' procedure. ("with cache, uncompressed"): New test. --- guix/scripts/publish.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index 8da75cb825..db7f6a957e 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -481,7 +481,8 @@ requested using POOL." (%private-key) #:nar-path nar-path #:compression compression - #:file-size (stat:size (stat nar))) + #:file-size (and=> (stat nar #f) + stat:size)) port)))))) ;; XXX: Declare the 'Guix-Compression' HTTP header, which is in fact for -- cgit v1.2.3