refresh: Honor the selected updaters when '-u' isn't given.

Fixes a regression introduced in
e9c72306fd.

* guix/scripts/refresh.scm (check-for-package-update): Add 'updaters'
parameter and honor it.
(guix-refresh): Pass UPDATERS to 'check-for-package-update'.
This commit is contained in:
Ludovic Courtès 2016-11-30 16:26:08 +01:00
parent 7632f7bc21
commit 4e6230ec00
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 3 deletions

View File

@ -261,10 +261,10 @@ downloaded and authenticated; not updating~%")
(when warn? (when warn?
(warn-no-updater package)))) (warn-no-updater package))))
(define* (check-for-package-update package #:key warn?) (define* (check-for-package-update package updaters #:key warn?)
"Check whether an update is available for PACKAGE and print a message. When "Check whether an update is available for PACKAGE and print a message. When
WARN? is true and no updater exists for PACKAGE, print a warning." WARN? is true and no updater exists for PACKAGE, print a warning."
(match (package-latest-release package %updaters) (match (package-latest-release package updaters)
((? upstream-source? source) ((? upstream-source? source)
(when (version>? (upstream-source-version source) (when (version>? (upstream-source-version source)
(package-version package)) (package-version package))
@ -438,7 +438,8 @@ update would trigger a complete rebuild."
(with-monad %store-monad (with-monad %store-monad
(return #t)))) (return #t))))
(else (else
(for-each (cut check-for-package-update <> #:warn? warn?) (for-each (cut check-for-package-update <> updaters
#:warn? warn?)
packages) packages)
(with-monad %store-monad (with-monad %store-monad
(return #t))))))))) (return #t)))))))))