Subject: Re: bug#39970: guix commands broken on Azerbaijani 'az_AZ' and Turkish 'tr_TR' locales

From: Ludovic Courtès <[email-masked]>
Date: Tue, 17 Mar 2020 22:20:01 +0100

Hi,

"pelzflorian (Florian Pelz)" <[email-masked]> skribis:

> On Thu, Mar 12, 2020 at 05:05:26PM +0100, Ludovic Courtès wrote:
>> "pelzflorian (Florian Pelz)" <[email-masked]> skribis:
>> > Why would not using a regexp be better?
>> 
>> It reduces reliance on libc, reduces complexity, and performs better as
>> noted in the commit log of 35eb77b09d957019b2437e7681bd88013d67d3cd.
>
> Thank you for your wisdom.  I hope the attached patch is OK.
>
> `LC_ALL=en_US.utf8 make check` is mostly fine (except tests/pack.scm,
> which also failed before).
>
> Manual testing of `./pre-inst-env guix environment` works.

Good!

> `LC_ALL=tr_TR.utf8 make check` is still very unhappy though.
> There are many failures.  I will continue to investigate later today.

OK.

> From: Florian Pelz <[email-masked]>
> Date: Thu, 12 Mar 2020 11:08:16 +0100
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> Subject: [PATCH] store: Fix many guix commands failing on some locales.
>
> Partly fixes bug #39970 (see: https://bugs.gnu.org/39970).

I’d just write:

  Partly fixes <https://bugs.gnu.org/39970>.

Concise, clear, greppable.  :-)

> At least 'guix environment', 'guix install' and 'guix pull'
> on 'az_AZ.utf8' and 'tr_TR.utf8' were affected.
>
> * guix/store.scm (store-path-hash-part): Move base path detection to ...
> (store-path-base): ... this new exported procedure.
> (store-path-package-name): Use it instead of locale-dependent regexps.
> (store-regexp*): Remove.

LGTM, thank you!

Ludo’.