guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Handle the case where there are no missing file n


From: Christopher Baines
Subject: branch master updated: Handle the case where there are no missing file names
Date: Fri, 24 Sep 2021 19:09:37 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new 211da68  Handle the case where there are no missing file names
211da68 is described below

commit 211da6868f135462f46e0d24518cdf298c54f231
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sat Sep 25 00:09:08 2021 +0100

    Handle the case where there are no missing file names
    
    In update-derivation-ids-hash-table!.
---
 guix-data-service/model/derivation.scm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/guix-data-service/model/derivation.scm 
b/guix-data-service/model/derivation.scm
index 24deffb..41c7c39 100644
--- a/guix-data-service/model/derivation.scm
+++ b/guix-data-service/model/derivation.scm
@@ -1702,13 +1702,14 @@ WHERE " criteria ";"))
      #t "debug: update-derivation-ids-hash-table!: lookup ~A file-names, ~A 
not cached\n"
      file-names-count (length missing-file-names))
 
-    (for-each
-     (match-lambda
-       ((id file-name)
-        (hash-set! derivation-ids-hash-table
-                   file-name
-                   (string->number id))))
-     (exec-query conn (select-existing-derivations missing-file-names)))))
+    (unless (null? missing-file-names)
+      (for-each
+       (match-lambda
+         ((id file-name)
+          (hash-set! derivation-ids-hash-table
+                     file-name
+                     (string->number id))))
+       (exec-query conn (select-existing-derivations missing-file-names))))))
 
 (define (derivation-file-names->derivation-ids conn derivation-file-names)
   (define (select-source-files-missing-nars derivation-ids)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]