aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/jobs
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-09-04 19:28:48 +0200
committerChristopher Baines <mail@cbaines.net>2019-09-05 16:07:23 +0200
commit1a55022524043bdf2f120dd38990d42949ecb6e2 (patch)
treebe78a6ade65501dfa4563214f7fb60766eaea746 /guix-data-service/jobs
parentf29230e034bd9d7ae201901efee18a166c966ea5 (diff)
downloaddata-service-1a55022524043bdf2f120dd38990d42949ecb6e2.tar
data-service-1a55022524043bdf2f120dd38990d42949ecb6e2.tar.gz
Improve the package and package-metadata modules
Add tests around the package module, extract out the use of the inferior-package record assessors so that they aren't part of the tests, and switch across the package-metadata module to use insert-missing-data-and-return-all-ids.
Diffstat (limited to 'guix-data-service/jobs')
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index 75eae4d..64e955b 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -454,7 +454,10 @@ WHERE job_id = $1"
(log-time "getting package-ids"
(lambda ()
(inferior-packages->package-ids
- conn packages packages-metadata-ids)))))
+ conn
+ (zip (map inferior-package-name packages)
+ (map inferior-package-version packages)
+ packages-metadata-ids))))))
(define (insert-lint-warnings conn inferior-package-id->package-database-id
lint-checker-ids
@@ -883,7 +886,9 @@ RETURNING id;")
(match (exec-query conn
query
- (list git-repository-id commit source))
+ (list (number->string git-repository-id)
+ commit
+ source))
((result)
result)
(() #f)))