[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
53/80: installer: Replace "%temporary-configuration-file-port" with "con
From: |
John Darrington |
Subject: |
53/80: installer: Replace "%temporary-configuration-file-port" with "config-file". |
Date: |
Tue, 3 Jan 2017 15:49:44 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit 0a82d35a8558af6f73a1a760725e6513396481b3
Author: John Darrington <address@hidden>
Date: Wed Dec 28 12:42:09 2016 +0100
installer: Replace "%temporary-configuration-file-port" with "config-file".
* gnu/system/installer/guixsd-installer.scm,
gnu/system/installer/install.scm,
gnu/system/installer/misc.scm, gnu/system/installer/configure.scm: Replace
%temporary-configuration-file-port with config-file.
---
gnu/system/installer/configure.scm | 10 ++++++----
gnu/system/installer/guixsd-installer.scm | 7 +++----
gnu/system/installer/install.scm | 3 +--
gnu/system/installer/misc.scm | 6 +++---
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/gnu/system/installer/configure.scm
b/gnu/system/installer/configure.scm
index 20b766b..a7cf3bf 100644
--- a/gnu/system/installer/configure.scm
+++ b/gnu/system/installer/configure.scm
@@ -79,10 +79,12 @@
((buttons-key-matches-symbol? nav ch 'save)
- ;; Write the configuration
- (truncate-file %temporary-configuration-file-port 0)
- (generate-guix-config %temporary-configuration-file-port)
- (force-output %temporary-configuration-file-port)
+
+ ;; Write the configuration and set the file name
+ (let ((cfg-port (mkstemp! (string-copy "/tmp/guix-config-XXXXXX"))))
+ (generate-guix-config cfg-port)
+ (set! config-file (port-filename cfg-port))
+ (close-port cfg-port))
;; Close the menu and return
(delwin (outer (page-wwin page)))
diff --git a/gnu/system/installer/guixsd-installer.scm
b/gnu/system/installer/guixsd-installer.scm
index 9ce144b..a69a715 100644
--- a/gnu/system/installer/guixsd-installer.scm
+++ b/gnu/system/installer/guixsd-installer.scm
@@ -114,10 +114,9 @@
(generate . , (make-task generate-menu-title
'(filesystems timezone hostname)
(lambda ()
- (let ((filename
- (port-filename
%temporary-configuration-file-port)))
- (and (file-exists? filename)
- (positive? (stat:size (stat
filename))))))
+ (and config-file
+ (file-exists? config-file)
+ (positive? (stat:size (stat
config-file)))))
(lambda (page)
(make-configure-page
diff --git a/gnu/system/installer/install.scm b/gnu/system/installer/install.scm
index 8521b30..44da10c 100644
--- a/gnu/system/installer/install.scm
+++ b/gnu/system/installer/install.scm
@@ -75,7 +75,6 @@
((buttons-key-matches-symbol? nav ch 'continue)
(let ((target "/target")
- (tmp-config (port-filename %temporary-configuration-file-port))
(window-port (make-window-port config-window))
(root-device (find-mount-device "/" mount-points)))
@@ -94,7 +93,7 @@
(zero? (pipe-cmd window-port "mount"
"mount" "-t" "ext4" root-device target))
(mkdir-p (string-append target "/etc"))
- (or (copy-file tmp-config
+ (or (copy-file config-file
(string-append target "/etc/config.scm"))
#t)
diff --git a/gnu/system/installer/misc.scm b/gnu/system/installer/misc.scm
index 291974e..e9e9083 100644
--- a/gnu/system/installer/misc.scm
+++ b/gnu/system/installer/misc.scm
@@ -22,7 +22,7 @@
#:export (livery-title)
#:export (time-zone)
#:export (host-name)
- #:export (%temporary-configuration-file-port)
+ #:export (config-file)
#:export (mount-points))
(define livery-title 1)
@@ -33,5 +33,5 @@
(define host-name "")
-(define %temporary-configuration-file-port
- (mkstemp! (string-copy "/tmp/guix-config-XXXXXX")))
+(define config-file #f)
+
- 72/80: installer: Ensure that all mount points are absolute paths., (continued)
- 72/80: installer: Ensure that all mount points are absolute paths., John Darrington, 2017/01/03
- 70/80: installer: Change essid --> wireless., John Darrington, 2017/01/03
- 52/80: installer: Fix bug where window-pipe did not return the proper exit status., John Darrington, 2017/01/03
- 78/80: installer: Rename "file-browser" -> "time-zone"., John Darrington, 2017/01/03
- 75/80: installer: Add predicate for the network task., John Darrington, 2017/01/03
- 50/80: installer: Rename module "new" to "guixsd-installer"., John Darrington, 2017/01/03
- 54/80: installer: Improve install page., John Darrington, 2017/01/03
- 62/80: installer: Use global variable instead of string literal for "/gnu"., John Darrington, 2017/01/03
- 63/80: installer: Do not use /tmp for holding the configuration., John Darrington, 2017/01/03
- 56/80: installer: Replace spawned mount command with the mount syscall., John Darrington, 2017/01/03
- 53/80: installer: Replace "%temporary-configuration-file-port" with "config-file".,
John Darrington <=
- 51/80: installer: Use consistent window heights., John Darrington, 2017/01/03
- 15/80: installer: Add procedures to replace car/cdr since these are frounded upon by Guile gurus., John Darrington, 2017/01/03
- 65/80: installer: Add flags to indicate network interface status., John Darrington, 2017/01/03
- 66/80: installer: Format configuration to fix width of window., John Darrington, 2017/01/03
- 80/80: installer: Use --fallback when installing., John Darrington, 2017/01/03
- 69/80: installer: Add page with which the wifi password can be entered., John Darrington, 2017/01/03
- 60/80: installer: Change N_ from a procedure to a macro., John Darrington, 2017/01/03
- 67/80: installer: Do not allow forms to set the cursor visibility., John Darrington, 2017/01/03
- 74/80: installer: Add option to final page to reboot the system., John Darrington, 2017/01/03
- 77/80: installer: Remove "continue" button from host name page., John Darrington, 2017/01/03