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.
This commit is contained in:
Christopher Baines 2021-08-01 16:23:57 +01:00
parent e53d8a84c6
commit 9540323458
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -54,16 +54,18 @@ (define-module (guix scripts weather)
(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))))
'()
(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)))
;; 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