[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
41/68: installer: keymap: Do not fail on non-kmscon terminals.
From: |
guix-commits |
Subject: |
41/68: installer: keymap: Do not fail on non-kmscon terminals. |
Date: |
Thu, 17 Jan 2019 08:05:17 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 479414e1c9e13ddce9e0c8741eb9f50dff62e333
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))))))
- branch master updated (073f5f2 -> 8cca59e), guix-commits, 2019/01/17
- 23/68: installer: Add configuration formatter., guix-commits, 2019/01/17
- 29/68: installer: Fix ethernet connection., guix-commits, 2019/01/17
- 24/68: installer: Do not ask for keyboard model., guix-commits, 2019/01/17
- 38/68: installer: locale: Make clear that the point is to select a glibc locale., guix-commits, 2019/01/17
- 37/68: installer: Reorder partitionment step., guix-commits, 2019/01/17
- 39/68: installer: locale: Set English as the default language., guix-commits, 2019/01/17
- 36/68: installer: Fix compute calls., guix-commits, 2019/01/17
- 40/68: installer: Turn "Cancel" buttons into "Exit" buttons., guix-commits, 2019/01/17
- 41/68: installer: keymap: Do not fail on non-kmscon terminals.,
guix-commits <=
- 54/68: file-systems: Add read-luks-partition-uuid., guix-commits, 2019/01/17
- 60/68: installer: welcome: Put "Graphical installer" ahead., guix-commits, 2019/01/17
- 45/68: installer: Make sure every sentence is dot terminated., guix-commits, 2019/01/17
- 42/68: installer: keymap: Fix keymap selection of layouts with not variant., guix-commits, 2019/01/17
- 46/68: installer: Make exit button optional for run-file-textbox-page., guix-commits, 2019/01/17
- 48/68: installer: partition: Precise when using Manual/Guided partionment., guix-commits, 2019/01/17
- 61/68: installer: Remove debug popup., guix-commits, 2019/01/17
- 56/68: installer: Various renamings., guix-commits, 2019/01/17
- 52/68: installer: partionment: Add encryption support., guix-commits, 2019/01/17
- 27/68: installer: Add new pages., guix-commits, 2019/01/17