guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: Avoid problems with lint warnings for duplicate p


From: Christopher Baines
Subject: branch master updated: Avoid problems with lint warnings for duplicate packages
Date: Sun, 09 Aug 2020 11:59:32 -0400

This is an automated email from the git hooks/post-receive script.

cbaines pushed a commit to branch master
in repository data-service.

The following commit(s) were added to refs/heads/master by this push:
     new a6a4a84  Avoid problems with lint warnings for duplicate packages
a6a4a84 is described below

commit a6a4a84b207c364d0c0e419039a6e4225a5ba196
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Aug 9 16:53:26 2020 +0100

    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.
---
 guix-data-service/jobs/load-new-guix-revision.scm | 27 ++++++++++++-----------
 1 file 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]