[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
28/197: installer: Add a variable to represent the minimum recommended s
From: |
Danny Milosavljevic |
Subject: |
28/197: installer: Add a variable to represent the minimum recommended store size. |
Date: |
Mon, 3 Jul 2017 20:36:54 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit dbfd22e0de23808c9f67c9963aa9b6877e92163d
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)))
-
+
- 33/197: installer: Improve dependencies on the final task., (continued)
- 33/197: installer: Improve dependencies on the final task., Danny Milosavljevic, 2017/07/03
- 17/197: installer: Add completion predicate for disk task., Danny Milosavljevic, 2017/07/03
- 21/197: installer: Fix incorrect host in ping task., Danny Milosavljevic, 2017/07/03
- 20/197: installer: Return slurped lines in their correct order., Danny Milosavljevic, 2017/07/03
- 25/197: installer: Connect ethernet interfaces on selection., Danny Milosavljevic, 2017/07/03
- 03/197: installer: Remove obsolete procedures/variables, Danny Milosavljevic, 2017/07/03
- 10/197: installer: Perform a task's dependencies prior to the task itself., Danny Milosavljevic, 2017/07/03
- 22/197: installer: Make "interfaces" return an alist., Danny Milosavljevic, 2017/07/03
- 26/197: installer: Let the kernel know about (possibly) changed partitions., Danny Milosavljevic, 2017/07/03
- 27/197: installer: Deal with partition tables which are (partially) corrupt., Danny Milosavljevic, 2017/07/03
- 28/197: installer: Add a variable to represent the minimum recommended store size.,
Danny Milosavljevic <=
- 32/197: installer: Remove ad-hoc completed predicate and use standard one., Danny Milosavljevic, 2017/07/03
- 34/197: installer: Replace some instances of "car"., Danny Milosavljevic, 2017/07/03
- 40/197: installer: Turn off kernel ring messages to console., Danny Milosavljevic, 2017/07/03
- 37/197: install: Define new procedure pipe-cmd and use it to implement window-pipe., Danny Milosavljevic, 2017/07/03
- 41/197: installer: Enable scrolling in the installation window., Danny Milosavljevic, 2017/07/03
- 38/197: installer: Correct bugs generating the configuration., Danny Milosavljevic, 2017/07/03
- 45/197: installer: Fix bug where window-pipe did not return the proper exit status., Danny Milosavljevic, 2017/07/03
- 43/197: installer: Rename module "new" to "guixsd-installer"., Danny Milosavljevic, 2017/07/03
- 42/197: installer: Wrap installer in (catch #t ...), Danny Milosavljevic, 2017/07/03
- 48/197: installer: Close unused ports in pipe-cmd., Danny Milosavljevic, 2017/07/03