guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: scripts: system: Rename grub? and install-grub? to bootloader? an


From: Danny Milosavljevic
Subject: 01/01: scripts: system: Rename grub? and install-grub? to bootloader? and install-bootloader?.
Date: Sat, 15 Apr 2017 09:25:24 -0400 (EDT)

dannym pushed a commit to branch master
in repository guix.

commit e61519ab9c26b2309c84b65456c4ee5cd4d2c163
Author: Mathieu Othacehe <address@hidden>
Date:   Sat Apr 15 15:22:47 2017 +0200

    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?.
---
 guix/scripts/system.scm | 50 ++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index a1c6d35..b1a754f 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -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!~%"))))
 
 (define* (perform-action action os
-                         #:key grub? dry-run? derivations-only?
+                         #:key bootloader? dry-run? derivations-only?
                          use-substitutes? device target
                          image-size full-boot?
                          (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
        ;; root.  See <http://bugs.gnu.org/21068>.
        (drvs   -> (if (memq action '(init reconfigure))
-                      (if grub?
+                      (if bootloader?
                           (list sys grub.cfg grub)
                           (list sys grub.cfg))
                       (list sys)))
@@ -648,7 +648,7 @@ output when building a system derivation, such as a disk 
image."
                     drvs)
 
           ;; Make sure GRUB is accessible.
-          (when grub?
+          (when bootloader?
             (let ((prefix (derivation->output-path grub)))
               (setenv "PATH"
                       (string-append  prefix "/bin:" prefix "/sbin:"
@@ -658,7 +658,7 @@ output when building a system derivation, such as a disk 
image."
             ((reconfigure)
              (mbegin %store-monad
                (switch-to-system os)
-               (mwhen grub?
+               (mwhen bootloader?
                  (install-grub* (derivation->output-path grub.cfg)
                                 device "/"))))
             ((init)
@@ -666,7 +666,7 @@ output when building a system derivation, such as a disk 
image."
              (format #t (_ "initializing operating system under '~a'...~%")
                      target)
              (install sys (canonicalize-path target)
-                      #:grub? grub?
+                      #:grub? bootloader?
                       #:grub.cfg (derivation->output-path grub.cfg)
                       #:device device))
             (else
@@ -788,7 +788,7 @@ Some ACTIONS support additional ARGS.\n"))
                                result)))
          (option '("no-grub") #f #f
                  (lambda (opt name arg result)
-                   (alist-cons 'install-grub? #f result)))
+                   (alist-cons 'install-bootloader? #f result)))
          (option '("full-boot") #f #f
                  (lambda (opt name arg result)
                    (alist-cons 'full-boot? #t result)))
@@ -825,7 +825,7 @@ Some ACTIONS support additional ARGS.\n"))
     (max-silent-time . 3600)
     (verbosity . 0)
     (image-size . ,(* 900 (expt 2 20)))
-    (install-grub? . #t)))
+    (install-bootloader? . #t)))
 
 
 ;;;
@@ -837,23 +837,23 @@ Some ACTIONS support additional ARGS.\n"))
 ACTION must be one of the sub-commands that takes an operating system
 declaration as an argument (a file name.)  OPTS is the raw alist of options
 resulting from command-line parsing."
-  (let* ((file     (match args
-                     (() #f)
-                     ((x . _) x)))
-         (system   (assoc-ref opts 'system))
-         (os       (if file
-                       (load* file %user-module
-                              #:on-error (assoc-ref opts 'on-error))
-                       (leave (_ "no configuration file specified~%"))))
-
-         (dry?     (assoc-ref opts 'dry-run?))
-         (grub?    (assoc-ref opts 'install-grub?))
-         (target   (match args
-                     ((first second) second)
-                     (_ #f)))
-         (device   (and grub?
-                        (grub-configuration-device
-                         (operating-system-bootloader os)))))
+  (let* ((file        (match args
+                        (() #f)
+                        ((x . _) x)))
+         (system      (assoc-ref opts 'system))
+         (os          (if file
+                          (load* file %user-module
+                                 #:on-error (assoc-ref opts 'on-error))
+                          (leave (_ "no configuration file specified~%"))))
+
+         (dry?        (assoc-ref opts 'dry-run?))
+         (bootloader? (assoc-ref opts 'install-bootloader?))
+         (target      (match args
+                        ((first second) second)
+                        (_ #f)))
+         (device      (and bootloader?
+                           (grub-configuration-device
+                            (operating-system-bootloader os)))))
 
     (with-store store
       (set-build-options-from-command-line store opts)
@@ -879,7 +879,7 @@ resulting from command-line parsing."
                                                        m)
                                                       (_ #f))
                                                     opts)
-                             #:grub? grub?
+                             #:bootloader? bootloader?
                              #:target target #:device device
                              #:gc-root (assoc-ref opts 'gc-root)))))
         #:system system))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]