From 6087e86d484778fe2d1d62899c9acec25a433ca2 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 26 May 2024 21:36:51 +0100 Subject: Omit none as a compression in narinfos To match the guix publish behaviour. --- guix-build-coordinator/hooks.scm | 14 ++++++++++++-- guix-build-coordinator/utils.scm | 6 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'guix-build-coordinator') diff --git a/guix-build-coordinator/hooks.scm b/guix-build-coordinator/hooks.scm index 50c2445..b2f6f6c 100644 --- a/guix-build-coordinator/hooks.scm +++ b/guix-build-coordinator/hooks.scm @@ -280,10 +280,15 @@ (if (pair? compression) (car compression) compression)) + ;; TODO This logic should sit elsewhere (nar-destination (string-append publish-directory "/" - "nar/" (symbol->string target-compression) "/" + "nar/" + (if (eq? compression 'none) + "" + (string-append + (symbol->string target-compression) "/")) (basename output-filename))) (temporary-destination (string-append nar-destination ".tmp"))) @@ -336,9 +341,14 @@ (if (pair? compression-details) (car compression-details) compression-details)) + ;; TODO This logic should sit elsewhere (file (string-append publish-directory "/" - "nar/" (symbol->string compression) "/" + "nar/" + (if (eq? compression 'none) + "" + (string-append + (symbol->string compression) "/")) (basename output-filename)))) (list compression (stat:size (stat file #f))))) compressions) diff --git a/guix-build-coordinator/utils.scm b/guix-build-coordinator/utils.scm index 0acd62a..0a3383c 100644 --- a/guix-build-coordinator/utils.scm +++ b/guix-build-coordinator/utils.scm @@ -567,9 +567,9 @@ (define* (store-item->recutils compression file-size) (let ((url (encode-and-join-uri-path `(,@(split-and-decode-uri-path nar-path) - ,@(if compression - (list (symbol->string compression)) - '()) + ,@(if (eq? compression 'none) + '() + (list (symbol->string compression))) ,(basename store-path))))) (format #f "URL: ~a~%Compression: ~a~%~@[FileSize: ~a~%~]" url -- cgit v1.2.3