This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] localedef: Add --localedir and --archive-file options (Bug 19130)
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: myllynen at redhat dot com, Mike Frysinger <vapier at gentoo dot org>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 16 Oct 2015 11:15:26 -0400
- Subject: Re: [PATCH] localedef: Add --localedir and --archive-file options (Bug 19130)
- Authentication-results: sourceware.org; auth=none
- References: <561F230E dot 5050801 at redhat dot com> <561F3618 dot 1050505 at redhat dot com>
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.