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] ldconfig: set LC_COLLATE to C


On 2017-11-28 00:47, Rical Jasan wrote:
> On 11/26/2017 03:32 AM, Aurelien Jarno wrote:
> > ldconfig supports "include" directives and use the glob function to
> > process them. The glob function sort entries according to the LC_COLLATE
> > category. When using a standard "include /etc/ld.so.conf.d/*.conf" entry
> > in /etc/ld.so.conf, the order therefore depends on the locale used to
> > ldconfig. Prefixing the files that have to be processed last with "z"
> > or "zz" (as it is often used) therefore doesn't work correctly as "z"
> > is not always the last letter. For example in the et_EE locale, it is
> > sorted after the "s".
> 
> Did you mean before the "s"?

More precisely just after the "s" or between the "s" and the "t".

> But wouldn't the user/admin expect the files to be sorted according to
> their locale?

There might be more than one admin on the system using different
locales. In addition to that ldconfig can be launched by system scripts
using a different locale.

> If a strict ordering is needed, I would expect numerical
> prefixing to be used.

In practice distributions ship file in /etc/ld.so.conf.d, so it's not
something fully in control of users. On Debian and Fedora for example
they start with letters. And depending on the locale, numerical prefixes
might be sorted before or after letters.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


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