summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-05-18 21:19:49 +0200
committerLudovic Courtès <ludo@gnu.org>2017-05-20 10:17:36 +0200
commit4a628d57fc7956ae8a0fb167337d83ba66fe4f52 (patch)
treea0e9bf6ec2c05de11ea15bfd924ebfd1de05e136 /guix
parent36c99429a3638305c16f1e6f5e087daa174d249c (diff)
downloadguix-patches-4a628d57fc7956ae8a0fb167337d83ba66fe4f52.tar
guix-patches-4a628d57fc7956ae8a0fb167337d83ba66fe4f52.tar.gz
publish: Fix narinfo rendering for already-compressed items.
Fixes <http://bugs.gnu.org/26975>. Reported by Mark H Weaver <mhw@netris.org>. * 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.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/publish.scm3
1 files changed, 2 insertions, 1 deletions
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