[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26339: [PATCH 16/18] scripts: system: Adapt "init" to new bootloader
From: |
Mathieu Othacehe |
Subject: |
bug#26339: [PATCH 16/18] scripts: system: Adapt "init" to new bootloader API. |
Date: |
Sun, 2 Apr 2017 15:52:40 +0200 |
* guix/scripts/system.scm (install): Pass install-proc as a new
argument. Rename other arguments.
Call install-bootloader instead of install-grub*.
(perform-action): Adapt.
---
guix/scripts/system.scm | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 9f1d4f95c..560115ec3 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -178,12 +178,14 @@ TARGET, and register them."
(define* (install os-drv target
#:key (log-port (current-output-port))
- grub? grub.cfg device)
- "Copy the closure of GRUB.CFG, which includes the output of OS-DRV, to
+ install-proc bootloader?
+ bootcfg bootcfg-location
+ device)
+ "Copy the closure of BOOTCFG, which includes the output of OS-DRV, to
directory TARGET. TARGET must be an absolute directory name since that's what
'guix-register' expects.
-When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG."
+When BOOTLOADER? is true, install bootloader on DEVICE, using BOOTCFG."
(define (maybe-copy to-copy)
(with-monad %store-monad
(if (string=? target "/")
@@ -212,16 +214,21 @@ the ownership of '~a' may be incorrect!~%")
(populate (lift2 populate-root-file-system %store-monad)))
(mbegin %store-monad
- ;; Copy the closure of GRUB.CFG, which includes OS-DIR, GRUB's
- ;; background image and so on.
- (maybe-copy grub.cfg)
+ ;; Copy the closure of BOOTCFG, which includes OS-DIR,
+ ;; eventual background image and so on.
+ (maybe-copy
+ (derivation->output-path bootcfg))
;; Create a bunch of additional files.
(format log-port "populating '~a'...~%" target)
(populate os-dir target)
- (mwhen grub?
- (install-grub* grub.cfg device target)))))
+ (mwhen bootloader?
+ (install-bootloader install-proc
+ #:bootcfg bootcfg
+ #:bootcfg-location bootcfg-location
+ #:device device
+ #:target target)))))
;;;
@@ -676,8 +683,10 @@ building anything."
(format #t (_ "initializing operating system under '~a'...~%")
target)
(install sys (canonicalize-path target)
- #:grub? grub?
- #:grub.cfg (derivation->output-path grub.cfg)
+ #:bootloader? bootloader?
+ #:bootcfg bootcfg
+ #:bootcfg-location bootcfg-location
+ #:install-proc install-proc
#:device device))
(else
;; All we had to do was to build SYS.
--
2.12.2
- bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top., (continued)
- bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top., Mathieu Othacehe, 2017/04/02
- bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top., Danny Milosavljevic, 2017/04/15
- bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top., Mathieu Othacehe, 2017/04/15
- bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top., Danny Milosavljevic, 2017/04/15
- bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top., Mathieu Othacehe, 2017/04/15
- bug#26339: [PATCH 09/18] scripts: system: Move save-load-path-excursion and save-environment-excursion macros to the top., Danny Milosavljevic, 2017/04/15
bug#26339: [PATCH 13/18] scripts: system: Remove unused variables., Mathieu Othacehe, 2017/04/02
bug#26339: [PATCH 14/18] scripts: system: Rename grub? and install-grub? to bootloader? and install-bootloader?., Mathieu Othacehe, 2017/04/02
bug#26339: [PATCH 15/18] scripts: system: Adapt "reconfigure" to new bootloader API., Mathieu Othacehe, 2017/04/02
bug#26339: [PATCH 16/18] scripts: system: Adapt "init" to new bootloader API.,
Mathieu Othacehe <=
bug#26339: [PATCH 18/18] scripts: system: Display bootloader device and type in "list-generations"., Mathieu Othacehe, 2017/04/02
bug#26339: [PATCH 11/18] bootloader: Add device and type to bootloader-configuration record., Mathieu Othacehe, 2017/04/02
bug#26339: [PATCH 17/18] scripts: system: Adapt "switch-generation" to new bootloader API., Mathieu Othacehe, 2017/04/02
- bug#26339: [PATCH 17/18] scripts: system: Adapt "switch-generation" to new bootloader API., Danny Milosavljevic, 2017/04/15
- bug#26339: [PATCH 17/18] scripts: system: Adapt "switch-generation" to new bootloader API., Mathieu Othacehe, 2017/04/15
- bug#26339: problem with commit abae042, Mathieu Othacehe, 2017/04/15
- bug#26339: problem with commit abae042, Danny Milosavljevic, 2017/04/15
- bug#26339: problem with commit abae042, Mathieu Othacehe, 2017/04/15
bug#26339: bootloader and kernel arguments "--root", "--system", "--load", Danny Milosavljevic, 2017/04/15
bug#26339: problem with commit abae042, Leo Famulari, 2017/04/15