dannym pushed a commit to branch wip-installer-2
in repository guix.
commit af8e9f65f9f68f4f37eeec34cbe3219222c0c670
Author: John Darrington <[email protected]>
Date: Mon Jan 2 09:32:36 2017 +0100
installer: Ensure that all mount points are absolute paths.
* gnu/system/installer/filesystems.scm (filesystem-task-incomplete-reason):
Add
condition that all mount points must be absolute.
---
gnu/system/installer/filesystems.scm | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/gnu/system/installer/filesystems.scm
b/gnu/system/installer/filesystems.scm
index a068125..bde276d 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 John Darrington <[email protected]>
+;;; Copyright © 2016, 2017 John Darrington <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -47,6 +47,22 @@
(N_ "You must specify a mount point for the root (/)."))
+ (let ((non-absolute-list (fold (lambda (x prev)
+ (if (absolute-file-name? (cdr x))
+ prev
+ (cons (cdr x) prev)))
+ '()
+ mount-points)))
+ (and (not (null? non-absolute-list))
+ (ngettext
+ (format #f
+ (N_ "The mount point ~s is a relative path. All mount
points must be absolute.")
+ (car non-absolute-list))
+ (format #f
+ (N_ "The mount points ~s are relative paths. All mount
points must be absolute.")
+ non-absolute-list)
+ (length non-absolute-list))))
+
(and (< (size-of-partition (find-mount-device (%store-directory)
mount-points))
minimum-store-size)
(format #f