mirror of
https://github.com/endeavouros-team/ISO-hotfixes.git
synced 2026-07-29 06:05:22 +00:00
31 lines
1.8 KiB
Diff
31 lines
1.8 KiB
Diff
--- main.py 2026-04-27 16:49:00.000000000 +0200
|
|
+++ main.py.patched 2026-07-01 22:30:02.000000000 +0200
|
|
@@ -171,5 +171,27 @@
|
|
for k, v in locale_conf.items():
|
|
edl.write("{!s}={!s}\n".format(k, v))
|
|
libcalamares.utils.debug('{!s} done'.format(target_etc_default_path))
|
|
+ # === SYSTEMD-LOCALED xkeyboard-config COMPATIBILITY HOTFIX ===
|
|
+ try:
|
|
+ # Execute shell script inside chroot context to avoid host path mapping
|
|
+ sh_script = (
|
|
+ 'X11_CONF="/etc/X11/xorg.conf.d/00-keyboard.conf"\n'
|
|
+ 'VCON_CONF="/etc/vconsole.conf"\n'
|
|
+ 'if [ -f "$X11_CONF" ] && [ -f "$VCON_CONF" ]; then\n'
|
|
+ ' # Clear existing XKB keys to prevent duplicates\n'
|
|
+ ' sed -i "/^XKBLAYOUT=/d; /^XKBMODEL=/d; /^XKBVARIANT=/d; /^XKBOPTIONS=/d" "$VCON_CONF"\n'
|
|
+ ' # Extract from X11 configuration and append directly\n'
|
|
+ ' sed -n \'s/.*Option *"XkbLayout" *"\\([^"]*\\)".*/XKBLAYOUT=\\1/p\' "$X11_CONF" >> "$VCON_CONF"\n'
|
|
+ ' sed -n \'s/.*Option *"XkbModel" *"\\([^"]*\\)".*/XKBMODEL=\\1/p\' "$X11_CONF" >> "$VCON_CONF"\n'
|
|
+ ' sed -n \'s/.*Option *"XkbVariant" *"\\([^"]*\\)".*/XKBVARIANT=\\1/p\' "$X11_CONF" >> "$VCON_CONF"\n'
|
|
+ ' sed -n \'s/.*Option *"XkbOptions" *"\\([^"]*\\)".*/XKBOPTIONS=\\1/p\' "$X11_CONF" >> "$VCON_CONF"\n'
|
|
+ 'fi\n'
|
|
+ )
|
|
|
|
+ # Execute within target environment
|
|
+ libcalamares.utils.target_env_call(["sh", "-c", sh_script])
|
|
+ libcalamares.utils.debug("[HOTFIX] Successfully synchronized XKB variables inside chroot.")
|
|
+ except Exception as e:
|
|
+ libcalamares.utils.warning(f"[HOTFIX] Chroot synchronization failed: {str(e)}")
|
|
+ # ============================================
|
|
return None
|