bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] maint: set LANG=C instead of LC_ALL=C


From: Eric Blake
Subject: Re: [PATCH] maint: set LANG=C instead of LC_ALL=C
Date: Thu, 10 Aug 2017 14:18:44 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 08/10/2017 11:36 AM, Daniel P. Berrange wrote:
> The maint.mk file currently sets LC_ALL=C so that build rules get a
> predictable locale, independant of the user's environment settings.

s/independant/independent/

> 
> It is sometimes neccesssary to override the locale when running

s/neccesssary/necessary/

> build commands from make rules, but as maint.mk set LC_ALL, it
> is impossible to selectively override rules e.g. LC_CTYPE=C.UTF-8
> will have no effect if LC_ALL is already set.
> 
> To deal with this maint.mk should instead set LANG=C, and then
> explicitly unset all the other LC_* variables.
> 
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  top/maint.mk | 24 +++++++++++++++++++++---
>  1 file changed, 21 insertions(+), 3 deletions(-)

>  
> -# Prevent programs like 'sort' from considering distinct strings to be equal.
> -# Doing it here saves us from having to set LC_ALL elsewhere in this file.
> -export LC_ALL = C
> +# Ensure a stable locale, independant of the user's environment, so that

s/independant/independent/

> +# locale sensitive programs used in the build (eg 'sort') have predictable
> +# output.
> +#
> +# We want apps to be able override individual locale categories in their
> +# make rules though, so must not set LC_ALL ourselves, but instead use
> +# LANG as the lowest priority variable.
> +unexport LC_ALL
> +unexport LC_CTYPE

Why not do a single line:

unexport LC_ALL LC_CTYPE ...

> +export LANG = C

Otherwise, the idea is sane to me.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]