guix-commits
[Top][All Lists]
Advanced

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

branch master updated: weather: Don't look for exported package replacem


From: guix-commits
Subject: branch master updated: weather: Don't look for exported package replacements twice.
Date: Fri, 03 Sep 2021 05:25:19 -0400

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

cbaines pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 9540323  weather: Don't look for exported package replacements twice.
9540323 is described below

commit 9540323458de87b0b8aa421e449a4fe27af7c393
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Sun Aug 1 16:23:57 2021 +0100

    weather: Don't look for exported package replacements twice.
    
    * guix/scripts/weather.scm (all-packages): Delete duplicates, so that 
exported
    replacements aren't included twice.
---
 guix/scripts/weather.scm | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 06312d6..60a697d 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -54,16 +54,18 @@
 
 (define (all-packages)
   "Return the list of public packages we are going to query."
-  (fold-packages (lambda (package result)
-                   (match (package-replacement package)
-                     ((? package? replacement)
-                      (cons* replacement package result))
-                     (#f
-                      (cons package result))))
-                 '()
-
-                 ;; Dismiss deprecated packages but keep hidden packages.
-                 #:select? (negate package-superseded)))
+  (delete-duplicates
+   (fold-packages (lambda (package result)
+                    (match (package-replacement package)
+                      ((? package? replacement)
+                       (cons* replacement package result))
+                      (#f
+                       (cons package result))))
+                  '()
+
+                  ;; Dismiss deprecated packages but keep hidden packages.
+                  #:select? (negate package-superseded))
+   eq?))
 
 (define (call-with-progress-reporter reporter proc)
   "This is a variant of 'call-with-progress-reporter' that works with monadic



reply via email to

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