[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
12/197: installer: Use call-with-temporary-output-file.
From: |
Danny Milosavljevic |
Subject: |
12/197: installer: Use call-with-temporary-output-file. |
Date: |
Mon, 3 Jul 2017 20:36:51 -0400 (EDT) |
dannym pushed a commit to branch wip-installer-2
in repository guix.
commit 5aee69d3cc314c3bb92701bc763ed85553d6ef0b
Author: John Darrington <address@hidden>
Date: Wed Dec 21 16:28:09 2016 +0100
installer: Use call-with-temporary-output-file.
* gnu/system/installer/new.scm (base-page-key-handler): Use existing
call-with-temporary-output-file procedure instead of rolling our own.
---
gnu/system/installer/new.scm | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/gnu/system/installer/new.scm b/gnu/system/installer/new.scm
index a9acbfe..9b18251 100644
--- a/gnu/system/installer/new.scm
+++ b/gnu/system/installer/new.scm
@@ -34,6 +34,7 @@
(gnu system installer dialog)
(guix build utils)
+ (guix utils)
(ice-9 format)
(ice-9 match)
@@ -149,13 +150,14 @@
(define (base-page-key-handler page ch)
(cond
((eqv? ch (key-f 1))
- (endwin)
- (let* ((p (mkstemp! (string-copy "/tmp/installer.XXXXXX")))
- (file-name (port-filename p)))
- (format p "echo '~a'\n" (gettext "Type \"exit\" to return to the GuixSD
installer."))
- (close p)
- (system* "bash" "--rcfile" file-name)
- (delete-file file-name)))
+
+ (call-with-temporary-output-file
+ (lambda (file-name port)
+ (endwin)
+ (format port "echo '~a'\n"
+ (gettext "Type \"exit\" to return to the GuixSD installer."))
+ (close port)
+ (system* "bash" "--rcfile" file-name))))
((eqv? ch (key-f 9))
(setlocale LC_ALL "de_DE.UTF-8")
- branch wip-installer-2 created (now ff63588), Danny Milosavljevic, 2017/07/03
- 04/197: installer: Fix broken timezone menu., Danny Milosavljevic, 2017/07/03
- 05/197: installer: fix warning in usage of "format"., Danny Milosavljevic, 2017/07/03
- 02/197: installer: Fix broken keymap change option., Danny Milosavljevic, 2017/07/03
- 07/197: installer: Use ice-9 match., Danny Milosavljevic, 2017/07/03
- 12/197: installer: Use call-with-temporary-output-file.,
Danny Milosavljevic <=
- 08/197: installer: Add IETF contraints for hostname in entry form., Danny Milosavljevic, 2017/07/03
- 06/197: installer: use ice-9 format everywhere., Danny Milosavljevic, 2017/07/03
- 11/197: installer: Change "interfaces" from a variable to a procedure., Danny Milosavljevic, 2017/07/03
- 16/197: installer: Add new procedure to get the list of volumes., Danny Milosavljevic, 2017/07/03
- 15/197: installer: Use %default-subsitute-urls instead of our own variable., Danny Milosavljevic, 2017/07/03
- 19/197: installer: Remove unused procedure., Danny Milosavljevic, 2017/07/03
- 18/197: installer: Handle the 'back' action in the filesystems task., Danny Milosavljevic, 2017/07/03
- 13/197: installer: Add alternate method of finding TZDIR., Danny Milosavljevic, 2017/07/03
- 31/197: installer: Make minumum-store-size variable global., Danny Milosavljevic, 2017/07/03
- 33/197: installer: Improve dependencies on the final task., Danny Milosavljevic, 2017/07/03