From 089b167812624cc69aac95d5a1b69688e3f97117 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 1 Aug 2016 17:42:09 +0200 Subject: publish: Do not compress already-compressed files. * guix/scripts/publish.scm (narinfo-string): Force %NO-COMPRESSION when STORE-PATH matches 'compressed-file?'. * guix/utils.scm (compressed-file?): New procedure. * tests/publish.scm ("/*.narinfo for a compressed file"): New test. --- guix/scripts/publish.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'guix/scripts/publish.scm') diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm index 2ca2aeebe3..8404e540f8 100644 --- a/guix/scripts/publish.scm +++ b/guix/scripts/publish.scm @@ -50,6 +50,7 @@ #:use-module (guix zlib) #:use-module (guix ui) #:use-module (guix scripts) + #:use-module ((guix utils) #:select (compressed-file?)) #:use-module ((guix build utils) #:select (dump-port)) #:export (guix-publish)) @@ -199,6 +200,9 @@ compression disabled~%")) if STORE-PATH is invalid. Produce a URL that corresponds to COMPRESSION. The narinfo is signed with KEY." (let* ((path-info (query-path-info store store-path)) + (compression (if (compressed-file? store-path) + %no-compression + compression)) (url (encode-and-join-uri-path `("nar" ,@(match compression -- cgit v1.2.3