aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-06-13 10:37:01 +0100
committerChristopher Baines <mail@cbaines.net>2024-06-13 11:01:19 +0100
commita6d2f22c39e8a1980755ee825c9c17864163f3c9 (patch)
tree94af41eb37fbf8a2cc4edc83da3116454a7d2d41
parent15fdb70be5ee73590fa9c122efa4f3bc1cce51b5 (diff)
downloadnar-herder-a6d2f22c39e8a1980755ee825c9c17864163f3c9.tar
nar-herder-a6d2f22c39e8a1980755ee825c9c17864163f3c9.tar.gz
Make the removal channel work without removal criteria
-rw-r--r--nar-herder/storage.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/nar-herder/storage.scm b/nar-herder/storage.scm
index 3f6cfd2..80c6b1d 100644
--- a/nar-herder/storage.scm
+++ b/nar-herder/storage.scm
@@ -496,9 +496,6 @@ When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates."
(log-msg 'INFO "finished looking for nars to remove, removed "
removed-count " files"))))))
- (when (null? nar-removal-criteria)
- (error "must be some removal criteria"))
-
(spawn-fiber
(lambda ()
(while #t
@@ -513,6 +510,9 @@ When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates."
(lambda ()
(with-throw-handler #t
(lambda ()
+ (when (null? nar-removal-criteria)
+ (error "must be some removal criteria"))
+
(cond
((not (file-exists?
(string-append storage-root
@@ -551,7 +551,8 @@ When VERIFY-CERTIFICATE? is true, verify HTTPS server certificates."
#:removed-count 1))
#:unwind? #t))))))
- (when storage-root
+ (when (and storage-root
+ (not (null? nar-removal-criteria)))
(spawn-fiber
(lambda ()
(while #t