aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2021-08-01 16:23:57 +0100
committerChristopher Baines <mail@cbaines.net>2021-09-03 10:08:27 +0100
commit9540323458de87b0b8aa421e449a4fe27af7c393 (patch)
treef19b29fafb7964eb57efaabc86fae2e3a5561347
parente53d8a84c6fbf7641e7d0e6e8658da0bb01fcd71 (diff)
downloadguix-9540323458de87b0b8aa421e449a4fe27af7c393.tar.gz
guix-9540323458de87b0b8aa421e449a4fe27af7c393.zip
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.
-rw-r--r--guix/scripts/weather.scm22
1 files changed, 12 insertions, 10 deletions
diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 06312d65a2..60a697d1ac 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