aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-01-21 23:53:52 +0000
committerChristopher Baines <mail@cbaines.net>2020-01-21 23:53:52 +0000
commita66cbd41f97e58d3ea0e75cd02cf07a1f11d2d9f (patch)
treedbdd885c04c9905bb5bcddb02307ae865255a4cb /guix-data-service
parentbf25a8db0278b49ef2149c69ef5d6dd2201fd413 (diff)
downloaddata-service-a66cbd41f97e58d3ea0e75cd02cf07a1f11d2d9f.tar
data-service-a66cbd41f97e58d3ea0e75cd02cf07a1f11d2d9f.tar.gz
Fail early if a package lookup fails when loading a revision
I think this might be happening when packages are filtered out as duplicates (by name and version), but then a reference to a duplicate occurs somewhere, like in a lint warning.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index c53c282..e685615 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -896,7 +896,13 @@ WHERE job_id = $1"
packages
package-ids))))
(lambda (inferior-id)
- (hashq-ref lookup-table inferior-id)))))
+ (or
+ (hashq-ref lookup-table inferior-id)
+ (error
+ (simple-format
+ #f
+ "error: inferior-package-id->package-database-id: ~A missing\n"
+ inferior-id)))))))
(simple-format
#t "debug: finished loading information from inferior\n")