From 1a55022524043bdf2f120dd38990d42949ecb6e2 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Wed, 4 Sep 2019 19:28:48 +0200 Subject: 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. --- guix-data-service/jobs/load-new-guix-revision.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'guix-data-service/jobs') 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))) -- cgit v1.2.3