dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 219c0f645588d84632debaab40efe5184202c02b
Author: John Darrington <[email protected]>
Date: Fri Dec 30 15:01:31 2016 +0100
installer: Prevent the user specifying the same mount point twice.
* gnu/system/installer/filesystems.scm (filesystem-task-incomplete): Add the
condition that no mount point may appear more than once.
---
gnu/system/installer/filesystems.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gnu/system/installer/filesystems.scm
b/gnu/system/installer/filesystems.scm
index 0f67342..4297ef3 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -51,6 +51,17 @@
(and (not (find-mount-device "/" mount-points))
(N_ "You must specify a mount point for the root (/)."))
+ (let loop ((ll mount-points)
+ (ac '()))
+ (match ll
+ ('() #f)
+ (((_ . directory) . rest)
+ (if (member directory ac)
+ (format #f
+ (N_ "You have specified the mount point ~a more than
once.")
+ directory)
+ (loop rest (cons directory ac))))))
+
(let ((partitions-without-filesystems
(fold (lambda (x prev)
(if (not (string-prefix? "ext"