Handle the case where there are no missing file names

In update-derivation-ids-hash-table!.
This commit is contained in:
Christopher Baines 2021-09-25 00:09:08 +01:00
parent 3081887b90
commit 211da6868f
1 changed files with 8 additions and 7 deletions

View File

@ -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)