summaryrefslogtreecommitdiff
path: root/guix/build/install.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-21 23:31:46 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-21 23:31:46 +0200
commit641f9a2a1f3a1ad0b4c3003a2efc5c7975286cc1 (patch)
treedbd5f61d3afc80a3998ac70f7a31d39ac0bb169d /guix/build/install.scm
parentd1f477199d649cbe33558ed218fa8063553decc3 (diff)
vm: Modularize build-side code.
* guix/build/install.scm (install-grub): Call 'error' if 'system*' returns non-zero. * guix/build/vm.scm (initialize-partition-table): Make 'partition-size' a positional parameter. Call 'error' when 'system*' returns non-zero'. (format-partition, initialize-root-partition): New procedures. (initialize-hard-disk): Use them.
Diffstat (limited to 'guix/build/install.scm')
-rw-r--r--guix/build/install.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/guix/build/install.scm b/guix/build/install.scm
index f61c16f13a..663a87b4b5 100644
--- a/guix/build/install.scm
+++ b/guix/build/install.scm
@@ -37,7 +37,7 @@
(define* (install-grub grub.cfg device mount-point)
"Install GRUB with GRUB.CFG on DEVICE, which is assumed to be mounted on
-MOUNT-POINT. Return #t on success."
+MOUNT-POINT."
(let* ((target (string-append mount-point "/boot/grub/grub.cfg"))
(pivot (string-append target ".new")))
(mkdir-p (dirname target))
@@ -47,9 +47,11 @@ MOUNT-POINT. Return #t on success."
(copy-file grub.cfg pivot)
(rename-file pivot target)
- (zero? (system* "grub-install" "--no-floppy"
- "--boot-directory" (string-append mount-point "/boot")
- device))))
+ (unless (zero? (system* "grub-install" "--no-floppy"
+ "--boot-directory"
+ (string-append mount-point "/boot")
+ device))
+ (error "failed to install GRUB"))))
(define (evaluate-populate-directive directive target)
"Evaluate DIRECTIVE, an sexp describing a file or directory to create under