[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
30/80: installer: Add a variable to represent the minimum recommended st
From: |
John Darrington |
Subject: |
30/80: installer: Add a variable to represent the minimum recommended store size. |
Date: |
Tue, 3 Jan 2017 15:49:43 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 3bfba84be45bdfaaa39c8d258336def522c4b6bb
Author: John Darrington <address@hidden>
Date: Sat Dec 24 16:29:50 2016 +0100
installer: Add a variable to represent the minimum recommended store size.
* gnu/system/installer/filesystems.scm (minimum-store-size): New variable.
---
gnu/system/installer/filesystems.scm | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/gnu/system/installer/filesystems.scm
b/gnu/system/installer/filesystems.scm
index ed35393..29d00fd 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -32,10 +32,11 @@
#:export (filesystem-task-complete?)
#:export (make-filesystem-page))
+(define minimum-store-size 7000)
(define (filesystem-task-complete?)
(and (find-mount-device "/" mount-points)
- (>= (sizeof-partition (find-mount-device "/gnu" mount-points)) 12000)))
+ (>= (sizeof-partition (find-mount-device "/gnu" mount-points))
minimum-store-size)))
(define (make-filesystem-page parent title)
(make-page (page-surface parent)
@@ -88,8 +89,8 @@
((eq? ch #\tab)
(cond
((menu-active menu)
- (menu-set-active! menu #f)
- (buttons-select nav 0))
+ (menu-set-active! menu #f)
+ (buttons-select nav 0))
((eqv? (buttons-selected nav) (1- (buttons-n-buttons nav)))
(menu-set-active! menu #t)
@@ -137,16 +138,18 @@
(set! page-stack (cons next page-stack))
((page-refresh next) next)))
- ((< (sizeof-partition (find-mount-device "/gnu" mount-points)) 12000)
+ ((< (sizeof-partition (find-mount-device "/gnu" mount-points))
minimum-store-size)
(let ((next
(make-dialog
page
(format #f
- (gettext
- "The filesystem for ~a needs at least ~a of disk space.")
"/gnu" "12GB"))))
+ (gettext
+ "The filesystem for ~a needs at least ~aGB of disk
space.")
+ "/gnu"
+ (/ minimum-store-size 1000)))))
(set! page-stack (cons next page-stack))
((page-refresh next) next)))
-
+
(else
(delwin (outer (page-wwin page)))
(set! page-stack (cdr page-stack))
@@ -159,9 +162,9 @@
(define (filesystem-page-init p)
(let* ((s (page-surface p))
(pr (make-boxed-window #f
- (- (getmaxy s) 4) (- (getmaxx s) 2)
- 2 1
- #:title (page-title p)))
+ (- (getmaxy s) 4) (- (getmaxx s) 2)
+ 2 1
+ #:title (page-title p)))
(text-window (derwin (inner pr) 3 (getmaxx (inner pr))
0 0))
@@ -169,7 +172,7 @@
(bwin (derwin (inner pr)
3 (getmaxx (inner pr))
(- (getmaxy (inner pr)) 3) 0
- #:panel #f))
+ #:panel #f))
(buttons (make-buttons my-buttons 1))
(mwin (derwin (inner pr)
@@ -181,14 +184,14 @@
#:disp-proc
(lambda (d row)
(let* ((part (car d))
- (name (partition-name part)))
+ (name (partition-name part)))
(format #f "~30a ~7a ~16a ~a"
name
(number->size (partition-size part))
(partition-fs part)
(let ((x (assoc-ref mount-points name)))
- (if x x ""))))))))
+ (if x x ""))))))))
(page-set-wwin! p pr)
@@ -199,5 +202,5 @@
(buttons-post buttons bwin)
(refresh (outer pr))
(refresh bwin)))
-
+
- 34/80: installer: Add path to mount/umount commands in installer service., (continued)
- 34/80: installer: Add path to mount/umount commands in installer service., John Darrington, 2017/01/03
- 58/80: installer: Allow users to remove mount points during configuration., John Darrington, 2017/01/03
- 11/80: installer: Change "interfaces" from a variable to a procedure., John Darrington, 2017/01/03
- 14/80: installer: Add alternate method of finding TZDIR., John Darrington, 2017/01/03
- 13/80: installer: Use call-with-temporary-output-file., John Darrington, 2017/01/03
- 22/80: installer: Return slurped lines in their correct order., John Darrington, 2017/01/03
- 16/80: installer: Use %default-subsitute-urls instead of our own variable., John Darrington, 2017/01/03
- 10/80: installer: Perform a task's dependencies prior to the task itself., John Darrington, 2017/01/03
- 18/80: installer: Add completion predicate for disk task., John Darrington, 2017/01/03
- 20/80: installer: Remove unused procedure., John Darrington, 2017/01/03
- 30/80: installer: Add a variable to represent the minimum recommended store size.,
John Darrington <=
- 44/80: installer: Add wireless-tools bin directory to PATH., John Darrington, 2017/01/03
- 41/80: install: Define new procedure pipe-cmd and use it to implement window-pipe., John Darrington, 2017/01/03
- 40/80: installer: Ensure that all mount-points have a file system., John Darrington, 2017/01/03
- 42/80: installer: Correct bugs generating the configuration., John Darrington, 2017/01/03
- 47/80: installer: Turn off kernel ring messages to console., John Darrington, 2017/01/03
- 39/80: installer: New predicate valid-hostname?, John Darrington, 2017/01/03
- 48/80: installer: Enable scrolling in the installation window., John Darrington, 2017/01/03
- 46/80: installer: Add inetutils bin directory to PATH., John Darrington, 2017/01/03
- 33/80: installer: Write the configuration to a temporary file., John Darrington, 2017/01/03
- 61/80: installer: Change the order of the filesystem task conditions., John Darrington, 2017/01/03