[libvirt] [PATCH] Be more clever and verbose about localization-initialization.

Fuchs, Andreas andreas.fuchs at sit.fraunhofer.de
Tue Oct 8 07:35:09 UTC 2013


I'd argue _for_ starting up libvirtd in case of errorous LC_* info. Since it is not a
user-facing application but a system daemon, I think the impact of wrong language
is small, but the benefit of having the daemon starting realiably is quite high.

To explain my case as example: I sshed into a server from a weirdly configured
desktop that had LC_MESSAGE set to de_DE and ran my script. Even though I
set LANG=C there, the daemon would fail. Once I found out, I unset LC_*, but it
still failed since tmux/bash "reinherited" the LC_*-stuff from ssh for some reason.
It was a mess to debug and in the end I had to unset the env variables on the
exec line that I passed on... :-(

Anyways, in case you prefer only the verbose error, I attached a "verbose only"
version, without the fallback part.

Cheers,
Andreas

P.S. I hope OWA behaves better than HTC's email-app yesterday.
________________________________________
Von: Daniel P. Berrange [berrange at redhat.com]
Gesendet: Montag, 7. Oktober 2013 18:24
An: Fuchs, Andreas
Cc: libvir-list at redhat.com
Betreff: Re: [libvirt] [PATCH] Be more clever and verbose about localization-initialization.

On Mon, Oct 07, 2013 at 06:09:21PM +0200, andreas.fuchs at sit.fraunhofer.de wrote:
> I should have been more specific. If e.g. an LC_MESSAGE is
> set that cannot be found it returns "initialization failed"
> and nothing more... See the bug report.Spent >1h this morning
> trying to get some demonstrator running... So I thought rather
> share it...

You mean if it is set to a language code which is invalid ?

I think that should just print a suitable error message
and then exit, rather than just switching to C locale

Daniel
--
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Be-more-verbose-about-textdomain-initialization.patch
Type: text/x-patch
Size: 1315 bytes
Desc: 0001-Be-more-verbose-about-textdomain-initialization.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131008/4b199528/attachment-0001.bin>


More information about the libvir-list mailing list