Lennart Poettering <lenn...@poettering.net> writes: > On Tue, 25.11.14 10:01, David Herrmann (dh.herrm...@gmail.com) wrote: > >> I explicitly ignore errors from verify_xkb_rmlvo() and proceed. >> libxkbcommon is still not 100% compatible to libxkb (and doesn't >> intend to be that, I guess). As we write X11 configs here, I just >> continue with a warning. >> >> If you call bus_error_setfv(), then sd-bus will return a method-error >> to the caller. However, you also send a method-return in >> method_set_x11_keyboard(). You thus end up with 2 calls. >> >> I'm not sure how to solve this. Furthermore, libxkbcommon can print a >> lot of informational warnings, and we shouldn't use just the last one. >> One idea would be to copy the same logic into localectl. You could >> also specify XKB_LOG_LEVEL and XKB_LOG_VERBOSITY as environment to get >> more information there. >> Yes, this would mean compiling the keymap twice, but it's for the sake >> of debugging output so I think it's fine. > > What precisely are the error messages libxkbcommon prints? Are they > really material to pass to the client? I mean, are they really about > some invalid data the client passed or just about something broken in > the way the system is set up? If it's the latter than I figure we > should return just a simple error to the client, and pass the full > logs to the logging stream... > > Lennart
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? Cheers, -- Jan Synacek Software Engineer, Red Hat
signature.asc
Description: PGP signature
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel