This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Gracefully handle incompatible locale data
- From: ludo at gnu dot org (Ludovic CourtÃs)
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: OndÅej BÃlka <neleai at seznam dot cz>, libc-alpha at sourceware dot org, guix-devel at gnu dot org, Roland McGrath <roland at hack dot frob dot com>
- Date: Sat, 26 Sep 2015 12:24:56 +0200
- Subject: Re: [PATCH] Gracefully handle incompatible locale data
- Authentication-results: sourceware.org; auth=none
- References: <876132lbic dot fsf at gnu dot org> <20150922191804 dot GA13637 at domone> <877fnijgin dot fsf at gnu dot org> <20150922215022 dot GA27201 at domone> <8737y4hkrz dot fsf at gnu dot org> <20150924082755 dot GA4767 at domone> <87h9mjeqyy dot fsf at gnu dot org> <5605BA8D dot 40907 at redhat dot com>
"Carlos O'Donell" <carlos@redhat.com> skribis:
> Despite Roland saying "LGTM", I think this is not a good change.
>
> Firstly, it's not the community consensus as Ondrej is pointing out.
>
> https://sourceware.org/glibc/wiki/Style_and_Conventions#Error_Handling
âAssertions are for internal consistency checking only.â I would argue
that what this patch changes is not an internal consistency check.
Furthermore, the function in question returns EINVAL in other similar
casesâe.g., when libc 2.22 loads LC_COLLATE data from libc 2.21.
So it is not clear to me that the patch would be a violation of these
rules. WDYT?
> It is a fundamental system misconfiguration issue not to have upgraded
> the binary locale data from one release to another.
I would not call it âmisconfiguration.â With GNU Guix, unprivileged
users can install packages in their âprofileâ and they are free to
choose whether and when to upgrade those packages. Consequently, they
might be using a libc version different from the one the system
administrator used to build the system-wide locale data.
Currently, the assertion failure greatly penalizes this use case:
https://lists.gnu.org/archive/html/guix-devel/2015-09/msg00717.html
Returning EINVAL instead of aborting would make things easier.
But itâs not perfect. IMO, a discussion on improving the coexistence of
different libc/locale versions on the same system is in order. But itâs
beyond the scope of this two-line patch.
Thanks,
Ludoâ.