[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fedora-livecd-list] LANGUAGE trumps LC_ALL
From: |
Jim Meyering |
Subject: |
Re: [Fedora-livecd-list] LANGUAGE trumps LC_ALL |
Date: |
Thu, 04 Mar 2010 10:47:53 +0100 |
Jim Meyering wrote:
> Mads Kiilerich wrote:
...
>> be aware that LANGUAGE trumps:
>>
>> $ LC_ALL=fr_FR.UTF-8 LANGUAGE=da_DK /bin/cat no-such
>> /bin/cat: no-such: Ingen sådan fil eller filkatalog
>>
>> $ LANGUAGE=da_DK.UTF-8 LC_ALL=fr_FR.UTF-8 LANG=C /sbin/parted
>> WARNING: You are not superuser. Watch out for permissions.
>> /dev/mapper/control: open failed: Adgang nægtet
>> Failure to communicate with kernel device-mapper driver.
>> Fejl: Ingen enhed fundet
>> Forsøg igen/Retry/Annullér/Cancel?
>
> Thanks for the info.
> Beware that using the LANGUAGE envvar like that takes advantage
> of a glibc extension, and hence is not portable.
> Knowing this, I've added "LANGUAGE" to the list of envvars
> that coreutils unsets when running its test suite.
> (for many Perl scripts it was already handled in individual scripts, but
> this change also protects shell scripts, none of which guarded against this)
As far as I can see, no test script is vulnerable to false positives,
either, since nothing failed (pre-patch), when I did this:
LC_ALL=fr_FR.UTF-8 LANGUAGE=da_DK make check
I've pushed the patch regardless.