Re: use locale for python package test
On 2004-04-29 GCS <firstname.lastname@example.org> wrote:
> I maintain a package, which needs en_US locale for testing the build. I
> did it as writing en_US to /etc/locale.gen and generate the locales
> again, if it's not yet done. Then set LC_ALL to en_US, and do the test.
> So far, so good, it works. But now I got a FTBFS as a simple user it can
> not be built (no permission for /etc/locale.gen). The reporter says there's
> localedef -i en_US -f ISO-8859-1 $(CURDIR)/debian/locale/en_US
> but how can I use the generated locale like it would be the system's
> I have tried setting LC_PATH to various directories (like
> $(CURDIR)/debian/locale/ ) without success.
The variable is named LOCPATH and not LC_PATH,
LOCPATH="$(CURDIR)/debian/locale" should work.
I wished this was documented. I only found this with
strings /lib/libc-2.3.2.so | grep 'PATH'
because it is not doumented in info manpages.
 The only reference is "The variables ... LOCPATH ... influence
locale handling, cf. locale(5)." in environ(7)
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"