]> git.ipfire.org Git - thirdparty/systemd.git/commit - mkosi.build
mkosi: use locale that supports UTF-8, detect one that is available (#8340)
authorFilipe Brandenburger <filbranden@google.com>
Mon, 5 Mar 2018 16:03:52 +0000 (08:03 -0800)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 5 Mar 2018 16:03:52 +0000 (17:03 +0100)
commit2ea09665e2064df725d2a2f18f24bac29fbee2c2
treeedae08d1f6e7bdd443cb216bb750201cdadd9c47
parent81818edc7acf6de3e496c5193d5d32dfb022fef9
mkosi: use locale that supports UTF-8, detect one that is available (#8340)

Using C.UTF-8 (as was done before #7244) breaks Arch Linux, but using
en_US.UTF-8 (after #7244) breaks Debian in our .mkosi/mkosi.debian.

So try to detect which one is available and works, first checking
whether we're already running under a valid UTF-8 locale, then trying
C.UTF-8 and finally en_US.UTF-8.

If we fail to find a valid UTF-8 locale, then fail early, instead of
letting the whole build complete only for Mesos to fail midway through
the `ninja test` step.

Tested on all of mkosi.fedora, mkosi.debian and mkosi.arch.

Fixes: #7238
mkosi.build