guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

72/80: installer: Ensure that all mount points are absolute paths.


From: John Darrington
Subject: 72/80: installer: Ensure that all mount points are absolute paths.
Date: Tue, 3 Jan 2017 15:49:46 +0000 (UTC)

jmd pushed a commit to branch wip-installer
in repository guix.

commit 41f6d7771356f07c56378029c88c9c63c8d421cc
Author: John Darrington <address@hidden>
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 <address@hidden>
+;;; Copyright © 2016, 2017 John Darrington <address@hidden>
 ;;;
 ;;; 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]