[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/06: guix system: Use 'mbegin' for 'install'.
From: |
Ludovic Courtès |
Subject: |
01/06: guix system: Use 'mbegin' for 'install'. |
Date: |
Tue, 02 Dec 2014 15:51:50 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit cc7fa5929c26fcdd53ce83ce7a46de4dfc7af1a2
Author: Ludovic Courtès <address@hidden>
Date: Mon Dec 1 23:07:11 2014 +0100
guix system: Use 'mbegin' for 'install'.
* guix/scripts/system.scm (install): Use 'mbegin'. Lift FORMAT and
POPULATE-ROOT-FILE-SYSTEM, and use the result.
---
guix/scripts/system.scm | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 8ea77e4..8e049a4 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -151,18 +151,22 @@ When GRUB? is true, install GRUB on DEVICE, using
GRUB.CFG."
;; Copy items to the new store.
(copy-closure to-copy target #:log-port log-port)))))
- (mlet* %store-monad ((os-dir -> (derivation->output-path os-drv))
- (% (maybe-copy os-dir)))
-
- ;; Create a bunch of additional files.
- (format log-port "populating '~a'...~%" target)
- (populate-root-file-system os-dir target)
-
- (when grub?
- (unless (false-if-exception (install-grub grub.cfg device target))
- (leave (_ "failed to install GRUB on device '~a'~%") device)))
-
- (return #t)))
+ (let ((os-dir (derivation->output-path os-drv))
+ (format (lift %store-monad format))
+ (populate (lift2 %store-monad populate-root-file-system)))
+
+ (mbegin %store-monad
+ (maybe-copy os-dir)
+
+ ;; Create a bunch of additional files.
+ (format log-port "populating '~a'...~%" target)
+ (populate os-dir target)
+
+ (begin
+ (when grub?
+ (unless (false-if-exception (install-grub grub.cfg device target))
+ (leave (_ "failed to install GRUB on device '~a'~%") device)))
+ (return #t)))))
;;;
- branch master updated (f4c4513 -> ec38437), Ludovic Courtès, 2014/12/02
- 05/06: derivations: Export 'derivation-builder'., Ludovic Courtès, 2014/12/02
- 01/06: guix system: Use 'mbegin' for 'install'.,
Ludovic Courtès <=
- 02/06: monads: Add 'mwhen' and 'munless'., Ludovic Courtès, 2014/12/02
- 06/06: packages: Use the target's system Guile when downloading patches., Ludovic Courtès, 2014/12/02
- 03/06: monads: Add 'lift0'., Ludovic Courtès, 2014/12/02
- 04/06: doc: Adjust misleading 'user-account' example., Ludovic Courtès, 2014/12/02