scripts: system: Rename grub? and install-grub? to bootloader? and install-bootloader?.

* guix/scripts/system.scm (perform-action): Rename grub? to bootloader,
(%options): rename install-grub? to install-bootloader?,
(%default-options): ditto,
(process-action): reindent and rename grub? to bootloader?.
This commit is contained in:
Mathieu Othacehe 2017-04-15 15:22:47 +02:00 committed by Danny Milosavljevic
parent 7085ca9690
commit e61519ab9c
No known key found for this signature in database
GPG Key ID: E71A35542C30BAA5
1 changed files with 24 additions and 24 deletions

View File

@ -591,7 +591,7 @@ PATTERN, a string. When PATTERN is #f, display all the system generations."
(warning (_ "Failing to do that may downgrade your system!~%")))) (warning (_ "Failing to do that may downgrade your system!~%"))))
(define* (perform-action action os (define* (perform-action action os
#:key grub? dry-run? derivations-only? #:key bootloader? dry-run? derivations-only?
use-substitutes? device target use-substitutes? device target
image-size full-boot? image-size full-boot?
(mappings '()) (mappings '())
@ -631,7 +631,7 @@ output when building a system derivation, such as a disk image."
;; --no-grub is passed, because GRUB.CFG because we then use it as a GC ;; --no-grub is passed, because GRUB.CFG because we then use it as a GC
;; root. See <http://bugs.gnu.org/21068>. ;; root. See <http://bugs.gnu.org/21068>.
(drvs -> (if (memq action '(init reconfigure)) (drvs -> (if (memq action '(init reconfigure))
(if grub? (if bootloader?
(list sys grub.cfg grub) (list sys grub.cfg grub)
(list sys grub.cfg)) (list sys grub.cfg))
(list sys))) (list sys)))
@ -648,7 +648,7 @@ output when building a system derivation, such as a disk image."
drvs) drvs)
;; Make sure GRUB is accessible. ;; Make sure GRUB is accessible.
(when grub? (when bootloader?
(let ((prefix (derivation->output-path grub))) (let ((prefix (derivation->output-path grub)))
(setenv "PATH" (setenv "PATH"
(string-append prefix "/bin:" prefix "/sbin:" (string-append prefix "/bin:" prefix "/sbin:"
@ -658,7 +658,7 @@ output when building a system derivation, such as a disk image."
((reconfigure) ((reconfigure)
(mbegin %store-monad (mbegin %store-monad
(switch-to-system os) (switch-to-system os)
(mwhen grub? (mwhen bootloader?
(install-grub* (derivation->output-path grub.cfg) (install-grub* (derivation->output-path grub.cfg)
device "/")))) device "/"))))
((init) ((init)
@ -666,7 +666,7 @@ output when building a system derivation, such as a disk image."
(format #t (_ "initializing operating system under '~a'...~%") (format #t (_ "initializing operating system under '~a'...~%")
target) target)
(install sys (canonicalize-path target) (install sys (canonicalize-path target)
#:grub? grub? #:grub? bootloader?
#:grub.cfg (derivation->output-path grub.cfg) #:grub.cfg (derivation->output-path grub.cfg)
#:device device)) #:device device))
(else (else
@ -788,7 +788,7 @@ Some ACTIONS support additional ARGS.\n"))
result))) result)))
(option '("no-grub") #f #f (option '("no-grub") #f #f
(lambda (opt name arg result) (lambda (opt name arg result)
(alist-cons 'install-grub? #f result))) (alist-cons 'install-bootloader? #f result)))
(option '("full-boot") #f #f (option '("full-boot") #f #f
(lambda (opt name arg result) (lambda (opt name arg result)
(alist-cons 'full-boot? #t result))) (alist-cons 'full-boot? #t result)))
@ -825,7 +825,7 @@ Some ACTIONS support additional ARGS.\n"))
(max-silent-time . 3600) (max-silent-time . 3600)
(verbosity . 0) (verbosity . 0)
(image-size . ,(* 900 (expt 2 20))) (image-size . ,(* 900 (expt 2 20)))
(install-grub? . #t))) (install-bootloader? . #t)))
;;; ;;;
@ -847,11 +847,11 @@ resulting from command-line parsing."
(leave (_ "no configuration file specified~%")))) (leave (_ "no configuration file specified~%"))))
(dry? (assoc-ref opts 'dry-run?)) (dry? (assoc-ref opts 'dry-run?))
(grub? (assoc-ref opts 'install-grub?)) (bootloader? (assoc-ref opts 'install-bootloader?))
(target (match args (target (match args
((first second) second) ((first second) second)
(_ #f))) (_ #f)))
(device (and grub? (device (and bootloader?
(grub-configuration-device (grub-configuration-device
(operating-system-bootloader os))))) (operating-system-bootloader os)))))
@ -879,7 +879,7 @@ resulting from command-line parsing."
m) m)
(_ #f)) (_ #f))
opts) opts)
#:grub? grub? #:bootloader? bootloader?
#:target target #:device device #:target target #:device device
#:gc-root (assoc-ref opts 'gc-root))))) #:gc-root (assoc-ref opts 'gc-root)))))
#:system system)))) #:system system))))