mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
Give a separate name to a commonly used expression.
* gnu/machine/ssh.scm (roll-back-managed-host): Factor out a subexpression into new variable parameters. Change-Id: I8d70684142bea736042d6c9dc8276ea7bdb9c181
This commit is contained in:
parent
b13726dd98
commit
8356f8c2ba
1 changed files with 23 additions and 25 deletions
|
@ -582,31 +582,29 @@ (define target-generation
|
||||||
(define roll-back-failure
|
(define roll-back-failure
|
||||||
(condition (&message (message (G_ "could not roll-back machine")))))
|
(condition (&message (message (G_ "could not roll-back machine")))))
|
||||||
|
|
||||||
(mlet* %store-monad ((boot-alternatives (machine->boot-alternatives machine))
|
(mlet* %store-monad
|
||||||
(_ -> (if (< (length boot-alternatives) 2)
|
((boot-alternatives (machine->boot-alternatives machine))
|
||||||
(raise roll-back-failure)))
|
(_ -> (when (< (length boot-alternatives) 2)
|
||||||
(entries -> (map boot-parameters->menu-entry
|
(raise roll-back-failure)))
|
||||||
(list (second boot-alternatives))))
|
(parameters (second boot-alternatives))
|
||||||
(locale -> (boot-parameters-locale
|
(entries -> (list (boot-parameters->menu-entry parameters)))
|
||||||
(second boot-alternatives)))
|
(locale -> (boot-parameters-locale parameters))
|
||||||
(crypto-dev -> (boot-parameters-store-crypto-devices
|
(crypto-dev -> (boot-parameters-store-crypto-devices parameters))
|
||||||
(second boot-alternatives)))
|
(store-dir -> (boot-parameters-store-directory-prefix parameters))
|
||||||
(store-dir -> (boot-parameters-store-directory-prefix
|
(old-entries -> (map boot-parameters->menu-entry
|
||||||
(second boot-alternatives)))
|
(drop boot-alternatives 2)))
|
||||||
(old-entries -> (map boot-parameters->menu-entry
|
(bootloader -> (operating-system-bootloader
|
||||||
(drop boot-alternatives 2)))
|
(machine-operating-system machine)))
|
||||||
(bootloader -> (operating-system-bootloader
|
(bootcfg (lower-object
|
||||||
(machine-operating-system machine)))
|
((bootloader-configuration-file-generator
|
||||||
(bootcfg (lower-object
|
(bootloader-configuration-bootloader
|
||||||
((bootloader-configuration-file-generator
|
bootloader))
|
||||||
(bootloader-configuration-bootloader
|
bootloader entries
|
||||||
bootloader))
|
#:locale locale
|
||||||
bootloader entries
|
#:store-crypto-devices crypto-dev
|
||||||
#:locale locale
|
#:store-directory-prefix store-dir
|
||||||
#:store-crypto-devices crypto-dev
|
#:old-entries old-entries)))
|
||||||
#:store-directory-prefix store-dir
|
(remote-result (machine-remote-eval machine remote-exp)))
|
||||||
#:old-entries old-entries)))
|
|
||||||
(remote-result (machine-remote-eval machine remote-exp)))
|
|
||||||
(when (eqv? 'error remote-result)
|
(when (eqv? 'error remote-result)
|
||||||
(raise roll-back-failure))))
|
(raise roll-back-failure))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue