aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2023-02-27 00:11:40 +0000
committerLudovic Courtès <ludo@gnu.org>2023-04-07 17:57:18 +0200
commitd442b7759662c925243f73678b647c4427ef7ac0 (patch)
treef8c911bb1b3c38d28b46da7858284aa913988a4b /gnu/services
parent189d30d7275905c8209066fd88fc634e18064972 (diff)
downloadguix-d442b7759662c925243f73678b647c4427ef7ac0.tar.gz
guix-d442b7759662c925243f73678b647c4427ef7ac0.zip
services: guix-publish: Remove 'compression-level' field.
* gnu/services/base.scm (<guix-publish-configuration>)[compression-level]: Remove field. (guix-publish-configuration-compression-level): Remove procedure. (default-compression): Remove compression-level helper code. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm29
1 files changed, 7 insertions, 22 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 74215b677a..e5c6bf5335 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -223,7 +223,6 @@
guix-publish-configuration-port
guix-publish-configuration-host
guix-publish-configuration-compression
- guix-publish-configuration-compression-level ;deprecated
guix-publish-configuration-nar-path
guix-publish-configuration-cache
guix-publish-configuration-ttl
@@ -1986,10 +1985,7 @@ proxy of 'guix-daemon'...~%")
(default #f))
(compression guix-publish-configuration-compression
(thunked)
- (default (default-compression this-record
- (current-source-location))))
- (compression-level %guix-publish-configuration-compression-level ;deprecated
- (default #f))
+ (default (default-compression this-record)))
(nar-path guix-publish-configuration-nar-path ;string
(default "nar"))
(cache guix-publish-configuration-cache ;#f | string
@@ -2003,25 +1999,14 @@ proxy of 'guix-daemon'...~%")
(negative-ttl guix-publish-configuration-negative-ttl ;#f | integer
(default #f)))
-(define-deprecated (guix-publish-configuration-compression-level config)
- "Return a compression level, the old way."
- (match (guix-publish-configuration-compression config)
- (((_ level) _ ...) level)))
-
-(define (default-compression config properties)
+(define (default-compression config)
"Return the default 'guix publish' compression according to CONFIG, and
raise a deprecation warning if the 'compression-level' field was used."
- (match (%guix-publish-configuration-compression-level config)
- (#f
- ;; Default to low compression levels when there's no cache so that users
- ;; get good bandwidth by default.
- (if (guix-publish-configuration-cache config)
- '(("gzip" 5) ("zstd" 19))
- '(("gzip" 3) ("zstd" 3)))) ;zstd compresses faster
- (level
- (warn-about-deprecation 'compression-level properties
- #:replacement 'compression)
- `(("gzip" ,level)))))
+ ;; Default to low compression levels when there's no cache so that users
+ ;; get good bandwidth by default.
+ (if (guix-publish-configuration-cache config)
+ '(("gzip" 5) ("zstd" 19))
+ '(("gzip" 3) ("zstd" 3)))) ;zstd compresses faster
(define (guix-publish-shepherd-service config)
(define (config->compression-options config)