[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
40/67: installer: keymap: Do not fail on non-kmscon terminals.
From: |
guix-commits |
Subject: |
40/67: installer: keymap: Do not fail on non-kmscon terminals. |
Date: |
Wed, 16 Jan 2019 19:00:42 -0500 (EST) |
civodul pushed a commit to branch wip-newt-installer
in repository guix.
commit 4ecb1440126f23d9d4809922f82bb23e4599de71
Author: Mathieu Othacehe <address@hidden>
Date: Wed Dec 5 21:53:40 2018 +0900
installer: keymap: Do not fail on non-kmscon terminals.
kmscon-update-keymap fails on non kmscon terminals because KEYMAP_UPDATE
environment variable is not defined. As it is convenient to test the
installer
on a regular terminal, do nothing if KEYMAP_UPDATE is missing.
* gnu/installer/keymap.scm (kmscon-update-keymap): Do nothing if
KEYMAP_UPDATE
is not defined.
---
gnu/installer/keymap.scm | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/gnu/installer/keymap.scm b/gnu/installer/keymap.scm
index d9f8656..d66b376 100644
--- a/gnu/installer/keymap.scm
+++ b/gnu/installer/keymap.scm
@@ -149,18 +149,24 @@ Configuration Database, describing possible XKB
configurations."
(values models layouts)))))
(define (kmscon-update-keymap model layout variant)
- (let ((keymap-file (getenv "KEYMAP_UPDATE")))
- (unless (and keymap-file
- (file-exists? keymap-file))
- (error "Unable to locate keymap update file"))
-
- (call-with-output-file keymap-file
- (lambda (port)
- (format port model)
- (put-u8 port 0)
-
- (format port layout)
- (put-u8 port 0)
-
- (format port variant)
- (put-u8 port 0)))))
+ "Update kmscon keymap with the provided MODEL, LAYOUT and VARIANT."
+ (and=>
+ (getenv "KEYMAP_UPDATE")
+ (lambda (keymap-file)
+ (unless (file-exists? keymap-file)
+ (error "Unable to locate keymap update file"))
+
+ ;; See file gnu/packages/patches/kmscon-runtime-keymap-switch.patch.
+ ;; This dirty hack makes possible to update kmscon keymap at runtime by
+ ;; writing an X11 keyboard model, layout and variant to a named pipe
+ ;; referred by KEYMAP_UPDATE environment variable.
+ (call-with-output-file keymap-file
+ (lambda (port)
+ (format port model)
+ (put-u8 port 0)
+
+ (format port layout)
+ (put-u8 port 0)
+
+ (format port variant)
+ (put-u8 port 0))))))
- 57/67: installer: parted: Do not call BLKRRPART on loop devices., (continued)
- 57/67: installer: parted: Do not call BLKRRPART on loop devices., guix-commits, 2019/01/16
- 08/67: doc: Document the graphical installer., guix-commits, 2019/01/16
- 03/67: gnu: kmscon: Add runtime keymap update support., guix-commits, 2019/01/16
- 27/67: installer: Redirect to TTY3 root shell for unguided install., guix-commits, 2019/01/16
- 13/67: installer: Fix locale installation., guix-commits, 2019/01/16
- 29/67: installer: Fix comments., guix-commits, 2019/01/16
- 25/67: installer: Add hostname., guix-commits, 2019/01/16
- 32/67: installer: Reorder POTFILES.in, guix-commits, 2019/01/16
- 38/67: installer: locale: Set English as the default language., guix-commits, 2019/01/16
- 34/67: installer: Remove group selection in user page., guix-commits, 2019/01/16
- 40/67: installer: keymap: Do not fail on non-kmscon terminals.,
guix-commits <=
- 45/67: installer: Make exit button optional for run-file-textbox-page., guix-commits, 2019/01/16
- 43/67: installer: partition: Differenciate Back button from Exit button., guix-commits, 2019/01/16
- 48/67: installer: menu: Fix typo., guix-commits, 2019/01/16
- 52/67: installer: Clear screen upon exit., guix-commits, 2019/01/16
- 44/67: installer: Make sure every sentence is dot terminated., guix-commits, 2019/01/16
- 47/67: installer: partition: Precise when using Manual/Guided partionment., guix-commits, 2019/01/16
- 65/67: installer: Adjust messages on the final page., guix-commits, 2019/01/16
- 66/67: installer: "formating" → "formatting"., guix-commits, 2019/01/16
- 12/67: installer: Move everything to the build side., guix-commits, 2019/01/16
- 39/67: installer: Turn "Cancel" buttons into "Exit" buttons., guix-commits, 2019/01/16