refresh: Be more verbose when passed an explicit package list.
* guix/scripts/refresh.scm (check-for-package-update): Use 'version-compare' instead of 'version>?'. When WARN? is true, print something for the '=' and '<' cases.
This commit is contained in:
parent
048175e2ce
commit
4c228f9e54
|
@ -253,15 +253,32 @@ downloaded and authenticated; not updating~%")
|
||||||
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)
|
(let ((loc (or (package-field-location package 'version)
|
||||||
(package-version package))
|
(package-location package))))
|
||||||
(let ((loc (or (package-field-location package 'version)
|
(case (version-compare (upstream-source-version source)
|
||||||
(package-location package))))
|
(package-version package))
|
||||||
(format (current-error-port)
|
((>)
|
||||||
(G_ "~a: ~a would be upgraded from ~a to ~a~%")
|
(format (current-error-port)
|
||||||
(location->string loc)
|
(G_ "~a: ~a would be upgraded from ~a to ~a~%")
|
||||||
(package-name package) (package-version package)
|
(location->string loc)
|
||||||
(upstream-source-version source)))))
|
(package-name package) (package-version package)
|
||||||
|
(upstream-source-version source)))
|
||||||
|
((=)
|
||||||
|
(when warn?
|
||||||
|
(format (current-error-port)
|
||||||
|
(G_ "~a: info: ~a is already the latest version of ~a~%")
|
||||||
|
(location->string loc)
|
||||||
|
(package-version package)
|
||||||
|
(package-name package))))
|
||||||
|
(else
|
||||||
|
(when warn?
|
||||||
|
(format (current-error-port)
|
||||||
|
(G_ "~a: warning: ~a is greater than \
|
||||||
|
the latest known version of ~a (~a)~%")
|
||||||
|
(location->string loc)
|
||||||
|
(package-version package)
|
||||||
|
(package-name package)
|
||||||
|
(upstream-source-version source)))))))
|
||||||
(#f
|
(#f
|
||||||
(when warn?
|
(when warn?
|
||||||
(warn-no-updater package)))))
|
(warn-no-updater package)))))
|
||||||
|
|
Loading…
Reference in New Issue