[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/155: installer: Use call-with-temporary-output-file.
From: |
John Darrington |
Subject: |
13/155: installer: Use call-with-temporary-output-file. |
Date: |
Wed, 21 Dec 2016 20:48:30 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 35cb20acbe37054cabaf8da6da80f05e6b6447af
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")
- 05/155: installer: fix warning in usage of "format"., (continued)
- 05/155: installer: fix warning in usage of "format"., John Darrington, 2016/12/21
- 08/155: installer: Add IETF contraints for hostname in entry form., John Darrington, 2016/12/21
- 07/155: installer: Use ice-9 match., John Darrington, 2016/12/21
- 06/155: installer: use ice-9 format everywhere., John Darrington, 2016/12/21
- 19/155: refresh: Make dependency on (guix import crates) weak., John Darrington, 2016/12/21
- 16/155: gnu: grub: Add dependency on efibootmgr., John Darrington, 2016/12/21
- 20/155: download: Protect against dangling symlinks in $SSL_CERT_DIR., John Darrington, 2016/12/21
- 11/155: installer: Change "interfaces" from a variable to a procedure., John Darrington, 2016/12/21
- 21/155: profiles: Build profiles in a UTF-8 locale., John Darrington, 2016/12/21
- 09/155: installer: Use a record instead of a list to contain tasks., John Darrington, 2016/12/21
- 13/155: installer: Use call-with-temporary-output-file.,
John Darrington <=
- 29/155: gnu: Add fatfsck-static., John Darrington, 2016/12/21
- 24/155: build: assert-no-store-file-names: Ignore ChangeLog., John Darrington, 2016/12/21
- 18/155: install: Add dosfstools., John Darrington, 2016/12/21
- 23/155: gnu: libupnp: Fix CVE-2016-8863., John Darrington, 2016/12/21
- 25/155: gnu: acme-client: Provide path to certificates., John Darrington, 2016/12/21
- 34/155: import cran: Do not use "or later" licenses by default., John Darrington, 2016/12/21
- 36/155: import cran: Handle BSD licenses with LICENSE file., John Darrington, 2016/12/21
- 15/155: doc: "Nar" now means "normalized archive"., John Darrington, 2016/12/21
- 14/155: Revert "gnu: kmod: Update to 23.", John Darrington, 2016/12/21
- 22/155: gnu: Add Greek Aspell dictionary, John Darrington, 2016/12/21