aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nar-herder/cached-compression.scm21
1 files changed, 17 insertions, 4 deletions
diff --git a/nar-herder/cached-compression.scm b/nar-herder/cached-compression.scm
index e6243fe..8527889 100644
--- a/nar-herder/cached-compression.scm
+++ b/nar-herder/cached-compression.scm
@@ -30,7 +30,8 @@
#:use-module (web client)
#:use-module (web response)
#:use-module (guix store)
- #:use-module ((guix utils) #:select (call-with-decompressed-port))
+ #:use-module ((guix utils) #:select (compressed-file?
+ call-with-decompressed-port))
#:use-module ((guix build utils)
#:select (dump-port mkdir-p))
#:use-module (nar-herder utils)
@@ -330,9 +331,21 @@
(missing-compressions
(lset-difference eq?
(map car enabled-cached-compressions)
- existing-compressions)))
-
- (unless (null? missing-compressions)
+ existing-compressions))
+ (compress-file?
+ (let ((url
+ (assq-ref
+ (first
+ (database-select-narinfo-files-by-narinfo-id
+ database
+ narinfo-id))
+ 'url)))
+
+ ;; TODO: Maybe this should be configurable?
+ (not (compressed-file? url)))))
+
+ (when (and compress-file?
+ (not (null? missing-compressions)))
(let ((new-count
(with-usage-hash-table
(lambda (usage)