[systemd-devel] [PATCH] localed: forward xkbcommon errors

Lennart Poettering lennart at poettering.net
Mon Dec 1 17:02:13 PST 2014


On Mon, 01.12.14 12:04, Jan Synacek (jsynacek at redhat.com) wrote:

> Thinking about it again, I don't think that it's a good idea to pass
> those errors to the client...
> 
> A few examples:
> 
> # localectl set-x11-keymap QQ
> 
> Dec 01 12:02:06 fedora-rawhide-systemd-virt systemd-localed[877]: libxkbcommon: Couldn't find file "symbols/QQ" in include paths
> Dec 01 12:02:06 fedora-rawhide-systemd-virt systemd-localed[877]: libxkbcommon: 1 include paths searched:
> Dec 01 12:02:06 fedora-rawhide-systemd-virt systemd-localed[877]: libxkbcommon:         /usr/share/X11/xkb
> Dec 01 12:02:06 fedora-rawhide-systemd-virt systemd-localed[877]: libxkbcommon: Abandoning symbols file "(unnamed)"
> Dec 01 12:02:06 fedora-rawhide-systemd-virt systemd-localed[877]: libxkbcommon: Failed to compile xkb_symbols
> Dec 01 12:02:06 fedora-rawhide-systemd-virt systemd-localed[877]: libxkbcommon: Failed to compile keymap
> Dec 01 12:02:06 fedora-rawhide-systemd-virt systemd-localed[877]: Cannot compile XKB keymap for new x11 keyboard layout ('' / 'QQ' / '' / ''): Invalid argument
> 
> # localectl set-x11-keymap us pc105 QQ
> 
> Dec 01 12:03:03 fedora-rawhide-systemd-virt systemd-localed[896]: libxkbcommon: Couldn't process include statement for 'us(QQ)'
> Dec 01 12:03:03 fedora-rawhide-systemd-virt systemd-localed[896]: libxkbcommon: Abandoning symbols file "(unnamed)"
> Dec 01 12:03:03 fedora-rawhide-systemd-virt systemd-localed[896]: libxkbcommon: Failed to compile xkb_symbols
> Dec 01 12:03:03 fedora-rawhide-systemd-virt systemd-localed[896]: libxkbcommon: Failed to compile keymap
> Dec 01 12:03:03 fedora-rawhide-systemd-virt systemd-localed[896]: Cannot compile XKB keymap for new x11 keyboard layout ('pc105' / 'us' / 'QQ' / ''): Invalid argument
> 
> Those errors are just stupid. Maybe they would make sense if there was
> also libxkbcommon code in front of me... But from the user's
> perspective, they say nothing useful. I added the prefix so the errors
> at least have some context.
> 
> My original patch would say something like "No such layout 'QQ'" in the
> first case and "No variant 'QQ' for layout 'us'" in the second.
> 
> So, is it worth logging this information? Any other ideas?

Maybe log it, but downgrade it to LOG_DEBUG?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list