refresh: Use the standard diagnostic procedures.
* guix/scripts/refresh.scm (warn-no-updater): Use 'warning' instead of 'format'. (update-package): Use 'info' and 'warning' instead of 'format'.
This commit is contained in:
parent
8d64ef567f
commit
4496ea74aa
|
@ -285,9 +285,8 @@ update would trigger a complete rebuild."
|
|||
(exit 0))
|
||||
|
||||
(define (warn-no-updater package)
|
||||
(format (current-error-port)
|
||||
(G_ "~a: warning: no updater for ~a~%")
|
||||
(location->string (package-location package))
|
||||
(warning (package-location package)
|
||||
(G_ "no updater for ~a~%")
|
||||
(package-name package)))
|
||||
|
||||
(define* (update-package store package updaters
|
||||
|
@ -306,9 +305,8 @@ warn about packages that have no matching updater."
|
|||
(when version
|
||||
(if (and=> tarball file-exists?)
|
||||
(begin
|
||||
(format (current-error-port)
|
||||
(G_ "~a: ~a: updating from version ~a to version ~a...~%")
|
||||
(location->string loc)
|
||||
(info loc
|
||||
(G_ "~a: updating from version ~a to version ~a...~%")
|
||||
(package-name package)
|
||||
(package-version package) version)
|
||||
(for-each
|
||||
|
@ -350,24 +348,21 @@ WARN? is true and no updater exists for PACKAGE, print a warning."
|
|||
(case (version-compare (upstream-source-version source)
|
||||
(package-version package))
|
||||
((>)
|
||||
(format (current-error-port)
|
||||
(G_ "~a: ~a would be upgraded from ~a to ~a~%")
|
||||
(location->string loc)
|
||||
(info loc
|
||||
(G_ "~a would be upgraded from ~a to ~a~%")
|
||||
(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)
|
||||
(info loc
|
||||
(G_ "~a is already the latest version of ~a~%")
|
||||
(package-version package)
|
||||
(package-name package))))
|
||||
(else
|
||||
(when warn?
|
||||
(format (current-error-port)
|
||||
(G_ "~a: warning: ~a is greater than \
|
||||
(warning loc
|
||||
(G_ "~a is greater than \
|
||||
the latest known version of ~a (~a)~%")
|
||||
(location->string loc)
|
||||
(package-version package)
|
||||
(package-name package)
|
||||
(upstream-source-version source)))))))
|
||||
|
|
Loading…
Reference in New Issue