[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
18/21: installer: Add completion predicate for disk task.
From: |
John Darrington |
Subject: |
18/21: installer: Add completion predicate for disk task. |
Date: |
Thu, 22 Dec 2016 19:58:40 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 77588cbba6ec6616e560060655384062b103f23d
Author: John Darrington <address@hidden>
Date: Thu Dec 22 19:14:24 2016 +0100
installer: Add completion predicate for disk task.
* gnu/system/installer/new.scm (size-of-largest-disk): New procedure, and
use it to make completion predicate for disk task.
---
gnu/system/installer/new.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gnu/system/installer/new.scm b/gnu/system/installer/new.scm
index 5d37e58..aa393b8 100644
--- a/gnu/system/installer/new.scm
+++ b/gnu/system/installer/new.scm
@@ -39,6 +39,7 @@
(ice-9 format)
(ice-9 match)
(ice-9 pretty-print)
+ (srfi srfi-1)
(srfi srfi-9))
@@ -56,11 +57,15 @@
(define timezone-menu-title (N_ "Set the time zone"))
(define hostname-menu-title (N_ "Set the host name"))
+(define (size-of-largest-disk)
+ (fold (lambda (disk prev) (max (disk-size disk) prev))
+ 0 (volumes)))
+
(define main-options
`(
(disk . ,(make-task partition-menu-title
'()
- (lambda () #f)
+ (lambda () (< 12000 (size-of-largest-disk)))
(lambda (page)
(make-disk-page
page
- branch wip-installer created (now 704f546), John Darrington, 2016/12/22
- 05/21: installer: fix warning in usage of "format"., John Darrington, 2016/12/22
- 02/21: installer: Fix broken keymap change option., John Darrington, 2016/12/22
- 06/21: installer: use ice-9 format everywhere., John Darrington, 2016/12/22
- 03/21: installer: Remove obsolete procedures/variables, John Darrington, 2016/12/22
- 07/21: installer: Use ice-9 match., John Darrington, 2016/12/22
- 20/21: installer: Remove unused procedure., John Darrington, 2016/12/22
- 14/21: installer: Add alternate method of finding TZDIR., John Darrington, 2016/12/22
- 21/21: gnu: guix: Add dependency: guile-ncurses., John Darrington, 2016/12/22
- 17/21: installer: Add new procedure to get the list of volumes., John Darrington, 2016/12/22
- 18/21: installer: Add completion predicate for disk task.,
John Darrington <=
- 04/21: installer: Fix broken timezone menu., John Darrington, 2016/12/22
- 11/21: installer: Change "interfaces" from a variable to a procedure., John Darrington, 2016/12/22
- 13/21: installer: Use call-with-temporary-output-file., John Darrington, 2016/12/22
- 08/21: installer: Add IETF contraints for hostname in entry form., John Darrington, 2016/12/22
- 19/21: installer: Handle the 'back' action in the filesystems task., John Darrington, 2016/12/22
- 12/21: installer: Add gurses modules., John Darrington, 2016/12/22
- 10/21: installer: Perform a task's dependencies prior to the task itself., John Darrington, 2016/12/22
- 09/21: installer: Use a record instead of a list to contain tasks., John Darrington, 2016/12/22
- 16/21: installer: Use %default-subsitute-urls instead of our own variable., John Darrington, 2016/12/22
- 15/21: installer: Add procedures to replace car/cdr since these are frounded upon by Guile gurus., John Darrington, 2016/12/22