Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH 1/2] Warn if LC_CTYPE does not transform ASCII chars like POSIX
Date: Sun, 15 Nov 2015 20:02:11
Message-Id: 5648E4B9.70802@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 1/2] Warn if LC_CTYPE does not transform ASCII chars like POSIX by "Michał Górny"
1 On 11/14/2015 02:56 PM, Michał Górny wrote:
2 > +def check_locale():
3 > + """
4 > + Check whether the locale is sane. Returns True if it is, prints
5 > + warning and returns False if it is not. Returns None if the check
6 > + can not be executed due to platform limitations.
7 > + """
8 > +
9 > + libc_fn = find_library("c")
10 > + if libc_fn is None:
11 > + return None
12 > + libc = LoadLibrary(libc_fn)
13 > + if libc is None:
14 > + return None
15
16 We should use a fork to isolate the LoadLibrary call in a child process,
17 in order to avoid triggering a relocation error during glibc upgrades,
18 as reported here:
19
20 https://bugs.gentoo.org/show_bug.cgi?id=448858
21
22 Other than that, the patch looks good now.
23 --
24 Thanks,
25 Zac