[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/22: installer: Add a variable to represent the minimum recommended st
From: |
John Darrington |
Subject: |
09/22: installer: Add a variable to represent the minimum recommended store size. |
Date: |
Tue, 27 Dec 2016 06:02:09 +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)))
-
+
- branch wip-installer updated (704f546 -> d654694), John Darrington, 2016/12/27
- 01/22: installer: Return slurped lines in their correct order., John Darrington, 2016/12/27
- 15/22: installer: Remove ad-hoc completed predicate and use standard one., John Darrington, 2016/12/27
- 02/22: installer: Fix incorrect host in ping task., John Darrington, 2016/12/27
- 06/22: installer: Connect ethernet interfaces on selection., John Darrington, 2016/12/27
- 14/22: installer: Make minumum-store-size variable global., John Darrington, 2016/12/27
- 04/22: installer: Use a cleaner way of generating the lspci information., John Darrington, 2016/12/27
- 16/22: installer: Improve dependencies on the final task., John Darrington, 2016/12/27
- 22/22: gnu: Add guix to the path environment for the guix-installer service., John Darrington, 2016/12/27
- 09/22: installer: Add a variable to represent the minimum recommended store size.,
John Darrington <=
- 17/22: installer: Replace some instances of "car"., John Darrington, 2016/12/27
- 20/22: install: Define new procedure pipe-cmd and use it to implement window-pipe., John Darrington, 2016/12/27
- 03/22: installer: Make "interfaces" return an alist., John Darrington, 2016/12/27
- 13/22: installer: Add path to mount/umount commands in installer service., John Darrington, 2016/12/27
- 10/22: gnu: Add service to start the installer in installation-os., John Darrington, 2016/12/27
- 11/22: installer: Add a task to actually call guix system init., John Darrington, 2016/12/27
- 18/22: installer: New predicate valid-hostname?, John Darrington, 2016/12/27
- 21/22: installer: Correct bugs generating the configuration., John Darrington, 2016/12/27
- 08/22: installer: Deal with partition tables which are (partially) corrupt., John Darrington, 2016/12/27
- 05/22: installer: Add a new menu to configure wireless interfaces., John Darrington, 2016/12/27