This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] localedef: Add --localedir and --archive-file options (Bug 19130)


On 10/15/2015 01:14 AM, Marko Myllynen wrote:
> Hi,
> 
> On 2015-10-15 06:52, Carlos O'Donell wrote:
>>
>> (a) Use of I18NPATH, LOCPATH, and change in behaviour of ENOENT for
>>     locale-archive.
>>
>> The selection of the character maps is achieved by use of the I18NPATH
>> env var, and LOCPATH env var for the location of source locale data.
> 
> are you sure about this? I was under impression it is only I18NPATH, not
> LOCPATH, that affects localedef. That's also what I see on my RHEL 7 /
> glibc-2.17 and what I've documented in the localedef(1) man page:
> 
> http://man7.org/linux/man-pages/man1/localedef.1.html

You are correct, only I18NPATH is used for both charmaps and locales.
I misread the sources for locfile.c and charmap.c.

>> These environment variables do not use --prefix. Both of these variables
>> will fallback to the default system directory during failure to find the
>> required files, while the above settings for prefix/localedir/archive-file
>> will create the requested binary locale archive file if not found. Note
>> that this is a change in behaviour, previously if the non-default binary
>> locale archive file was not found we would issue an error (only creating
>> the default locale archive was supported). Now we treat all locale-archive
>> files the same way. It might be argued that a "--create" mode should be
>> used and errors issued if the file doesn't exist in all cases, but this
>> breaks backwards compatibility and should be avoided. The only thing we
>> break with this patch is using `--list-archive foo` to test if `foo`
>> is present and a locale-archive file, which now returns nothing, but
>> doesn't fail (like we did for the default locale archive).
> 
> Once the patches have been merged, could you kindly check whether any
> changes for the man page is needed? Or if you plan to implement (b)
> soon, perhaps we could review the man page after that.

I will submit a followup patch to the linux man pages project.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]