diff options
author | Christopher Baines <mail@cbaines.net> | 2020-08-09 16:53:26 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-08-09 16:53:26 +0100 |
commit | a6a4a84b207c364d0c0e419039a6e4225a5ba196 (patch) | |
tree | 422b3f5d33a6c44237e28a531188b39991de08d4 | |
parent | 1e0332136ecaaeb3bc927a62450f8066f2f06ecd (diff) | |
download | data-service-a6a4a84b207c364d0c0e419039a6e4225a5ba196.tar data-service-a6a4a84b207c364d0c0e419039a6e4225a5ba196.tar.gz |
Avoid problems with lint warnings for duplicate packages
Use the deduplicated list of packages when fetching lint warnings, to avoid
duplicates. This was first seen in the following Guix commit
843344273c6a587b8e6c84d8406500fd64d8908a.
-rw-r--r-- | guix-data-service/jobs/load-new-guix-revision.scm | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index 9cc4ef4..65fa705 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -362,7 +362,7 @@ WHERE job_id = $1" #f))) -(define (all-inferior-lint-warnings inf store) +(define (all-inferior-lint-warnings inf store packages) (define locales '("cs_CZ.utf8" "da_DK.utf8" @@ -435,17 +435,18 @@ WHERE job_id = $1" (match-lambda ((package-id . warnings) (not (null? warnings)))) - (hash-map->list - (lambda (package-id package) - (cons - package-id - (map process-lint-warning - (if (and lint-checker-requires-store?-defined? - (lint-checker-requires-store? checker)) - - (check package #:store store) - (check package))))) - %package-table))))) + (map + (lambda (package-id) + (let ((package (hashv-ref %package-table package-id))) + (cons + package-id + (map process-lint-warning + (if (and lint-checker-requires-store?-defined? + (lint-checker-requires-store? checker)) + + (check package #:store store) + (check package)))))) + (list ,@(map inferior-package-id packages))))))) (and (or (inferior-eval '(and (resolve-module '(guix lint) #:ensure #f) @@ -1152,7 +1153,7 @@ WHERE job_id = $1" (inferior-packages inf)))) (inferior-lint-warnings (with-time-logging "fetching inferior lint warnings" - (all-inferior-lint-warnings inf store))) + (all-inferior-lint-warnings inf store packages))) (inferior-data-4-tuples (with-time-logging "getting inferior derivations" (all-inferior-package-derivations store inf packages))) |