installer: Report to the user the formatted partitions.
* gnu/installer/newt/partitions.scm (define-module): Use (ice-9 format). (draw-formatting-page): Add parameter partitions and provide the list of formatted partitions to the user. (run-partitioning-page): Provide user-partitions to draw-formatting-page.
This commit is contained in:
parent
8f71305e8f
commit
bc9e66f0fe
1 changed files with 11 additions and 4 deletions
|
@ -25,6 +25,7 @@
|
||||||
#:use-module (gnu installer newt page)
|
#:use-module (gnu installer newt page)
|
||||||
#:use-module (gnu installer newt utils)
|
#:use-module (gnu installer newt utils)
|
||||||
#:use-module (guix i18n)
|
#:use-module (guix i18n)
|
||||||
|
#:use-module (ice-9 format)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
|
@ -56,11 +57,17 @@
|
||||||
#:button-callback-procedure button-exit-action)))
|
#:button-callback-procedure button-exit-action)))
|
||||||
(car result)))
|
(car result)))
|
||||||
|
|
||||||
(define (draw-formatting-page)
|
(define (draw-formatting-page partitions)
|
||||||
"Draw a page asking for confirmation, and then indicating that partitions
|
"Draw a page asking for confirmation, and then indicating that partitions
|
||||||
are being formatted."
|
are being formatted."
|
||||||
(run-confirmation-page (G_ "We are about to format your hard disk. All \
|
;; TRANSLATORS: The ~{ and ~} format specifiers are used to iterate the list
|
||||||
its data will be lost. Do you wish to continue?")
|
;; of device names of the user partitions that will be formatted.
|
||||||
|
(run-confirmation-page (format #f (G_ "We are about to write the configured \
|
||||||
|
partition table to the disk and format the partitions listed below. Their \
|
||||||
|
data will be lost. Do you wish to continue?~%~{ - ~a~%~}")
|
||||||
|
(map user-partition-file-name
|
||||||
|
(filter user-partition-need-formatting?
|
||||||
|
partitions)))
|
||||||
(G_ "Format disk?")
|
(G_ "Format disk?")
|
||||||
#:exit-button-procedure button-exit-action)
|
#:exit-button-procedure button-exit-action)
|
||||||
(draw-info-page
|
(draw-info-page
|
||||||
|
@ -773,7 +780,7 @@ by pressing the Exit button.~%~%")))
|
||||||
(user-partitions (run-page non-install-devices))
|
(user-partitions (run-page non-install-devices))
|
||||||
(user-partitions-with-pass (prompt-luks-passwords
|
(user-partitions-with-pass (prompt-luks-passwords
|
||||||
user-partitions))
|
user-partitions))
|
||||||
(form (draw-formatting-page)))
|
(form (draw-formatting-page user-partitions)))
|
||||||
;; Make sure the disks are not in use before proceeding to formatting.
|
;; Make sure the disks are not in use before proceeding to formatting.
|
||||||
(free-parted non-install-devices)
|
(free-parted non-install-devices)
|
||||||
(format-user-partitions user-partitions-with-pass)
|
(format-user-partitions user-partitions-with-pass)
|
||||||
|
|
Reference in a new issue