diff options
-rw-r--r-- | guix/scripts/refresh.scm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 60e822b16b..1d86f949c8 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -179,24 +179,24 @@ specified with `--select'.\n")) (let* ((packages (fold-packages cons '())) (total (length packages))) - (define covered - (fold (lambda (updater covered) - (let ((matches (count (upstream-updater-predicate updater) - packages))) + (define uncovered + (fold (lambda (updater uncovered) + (let ((matches (filter (upstream-updater-predicate updater) + packages))) ;; TRANSLATORS: The parenthetical expression here is rendered ;; like "(42% coverage)" and denotes the fraction of packages ;; covered by the given updater. (format #t (G_ " - ~a: ~a (~2,1f% coverage)~%") (upstream-updater-name updater) (G_ (upstream-updater-description updater)) - (* 100. (/ matches total))) - (+ covered matches))) - 0 + (* 100. (/ (length matches) total))) + (lset-difference eq? uncovered matches))) + packages (force %updaters))) (newline) (format #t (G_ "~2,1f% of the packages are covered by these updaters.~%") - (* 100. (/ covered total)))) + (* 100. (/ (- total (length uncovered)) total)))) (exit 0)) (define (warn-no-updater package) |