mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-07 11:29:59 +01:00
reconfigure: Use 'formatted-message'.
* guix/scripts/system/reconfigure.scm (ensure-forward-reconfigure): Use 'formatted-message'. * guix/scripts/deploy.scm (deploy-machine*): Handle it.
This commit is contained in:
parent
1b4931555b
commit
7916201c4d
2 changed files with 13 additions and 5 deletions
|
@ -28,6 +28,8 @@
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (guix grafts)
|
#:use-module (guix grafts)
|
||||||
#:use-module (guix status)
|
#:use-module (guix status)
|
||||||
|
#:use-module (guix diagnostics)
|
||||||
|
#:use-module (guix i18n)
|
||||||
#:use-module (ice-9 format)
|
#:use-module (ice-9 format)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
|
@ -132,6 +134,13 @@ Perform the deployment specified by FILE.\n"))
|
||||||
(leave (G_ "failed to deploy ~a: ~a~%")
|
(leave (G_ "failed to deploy ~a: ~a~%")
|
||||||
(machine-display-name machine)
|
(machine-display-name machine)
|
||||||
(condition-message c)))
|
(condition-message c)))
|
||||||
|
((formatted-message? c)
|
||||||
|
(leave (G_ "failed to deploy ~a: ~a~%")
|
||||||
|
(machine-display-name machine)
|
||||||
|
(apply format #f
|
||||||
|
(gettext (formatted-message-string c)
|
||||||
|
%gettext-domain)
|
||||||
|
(formatted-message-arguments c))))
|
||||||
((deploy-error? c)
|
((deploy-error? c)
|
||||||
(when (deploy-error-should-roll-back c)
|
(when (deploy-error-should-roll-back c)
|
||||||
(info (G_ "rolling back ~a...~%")
|
(info (G_ "rolling back ~a...~%")
|
||||||
|
|
|
@ -308,12 +308,11 @@ ancestor of COMMIT, unless CHANNEL specifies a commit."
|
||||||
('self #t)
|
('self #t)
|
||||||
(_
|
(_
|
||||||
(raise (make-compound-condition
|
(raise (make-compound-condition
|
||||||
(condition
|
(formatted-message (G_ "\
|
||||||
(&message (message
|
|
||||||
(format #f (G_ "\
|
|
||||||
aborting reconfiguration because commit ~a of channel '~a' is not a descendant of ~a")
|
aborting reconfiguration because commit ~a of channel '~a' is not a descendant of ~a")
|
||||||
commit (channel-name channel)
|
commit (channel-name channel)
|
||||||
start)))
|
start)
|
||||||
|
(condition
|
||||||
(&fix-hint
|
(&fix-hint
|
||||||
(hint (G_ "Use @option{--allow-downgrades} to force
|
(hint (G_ "Use @option{--allow-downgrades} to force
|
||||||
this downgrade.")))))))))
|
this downgrade.")))))))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue