aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-03-24 11:59:44 +0000
committerChristopher Baines <mail@cbaines.net>2019-03-24 11:59:44 +0000
commit5fcabe95f2c10477e6a77efb5bb4bbd0ac57a5a0 (patch)
tree5de62a9ac251e3a52892bb02d472cd1de6f56b26
parentdaa2790f59c7353b3dcd0218f975684c7101acae (diff)
downloaddata-service-5fcabe95f2c10477e6a77efb5bb4bbd0ac57a5a0.tar
data-service-5fcabe95f2c10477e6a77efb5bb4bbd0ac57a5a0.tar.gz
Handle 0 derivations in package-data-vhash->derivations-and-build-status
-rw-r--r--guix-data-service/comparison.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/guix-data-service/comparison.scm b/guix-data-service/comparison.scm
index fcb1dee..1a12005 100644
--- a/guix-data-service/comparison.scm
+++ b/guix-data-service/comparison.scm
@@ -109,15 +109,15 @@ ORDER BY base_packages.name DESC, base_packages.version, target_packages.name, t
vhash))
(let* ((derivation-file-names
- (vhash->derivation-file-names packages-vhash))
- (derivation-data
- (select-derivations-and-build-status
- conn
- #:file-names derivation-file-names
- #:systems (if (null? systems) #f systems)
- #:targets (if (null? targets) #f targets)
- #:build-statuses (if (null? build-statuses) #f build-statuses))))
- derivation-data))
+ (vhash->derivation-file-names packages-vhash)))
+ (if (null? derivation-file-names)
+ '()
+ (select-derivations-and-build-status
+ conn
+ #:file-names derivation-file-names
+ #:systems (if (null? systems) #f systems)
+ #:targets (if (null? targets) #f targets)
+ #:build-statuses (if (null? build-statuses) #f build-statuses)))))
(define (package-data-vhash->package-name-and-version-vhash vhash)
(vhash-fold (lambda (name details result)