From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: bug#39970: guix commands broken on Azerbaijani 'az_AZ' and Turkish 'tr_TR' locales Date: Sat, 7 Mar 2020 13:00:52 +0100 Message-ID: <20200307120052.ocwzphlvemvmb2ts@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="n7jv6se5e47ytj2s" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55382) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAY9b-0005Ny-Kp for bug-guix@gnu.org; Sat, 07 Mar 2020 07:02:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAY9a-0003EK-C1 for bug-guix@gnu.org; Sat, 07 Mar 2020 07:02:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40353) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAY9a-0003EF-8V for bug-guix@gnu.org; Sat, 07 Mar 2020 07:02:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jAY9a-000786-6H for bug-guix@gnu.org; Sat, 07 Mar 2020 07:02:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:54923) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAY8Y-0005KP-5q for bug-guix@gnu.org; Sat, 07 Mar 2020 07:01:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAY8X-0001G5-17 for bug-guix@gnu.org; Sat, 07 Mar 2020 07:00:58 -0500 Received: from pelzflorian.de ([5.45.111.108]:38970 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jAY8W-0001Bf-G9 for bug-guix@gnu.org; Sat, 07 Mar 2020 07:00:56 -0500 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id A388A3604F7 for ; Sat, 7 Mar 2020 13:00:53 +0100 (CET) Content-Disposition: inline List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 39970@debbugs.gnu.org --n7jv6se5e47ytj2s Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable After running export LC_ALL=3Dtr_TR.utf8 many important Guix commands like 'guix environment', 'guix install' and 'guix pull' fail. $ guix environment --ad-hoc hello Backtrace: 1 (primitive-load "/home/florian/.config/guix/current/bin=E2=80= =A6") In guix/ui.scm: 1826:12 0 (run-guix-command _ . _) guix/ui.scm:1826:12: In procedure run-guix-command: In procedure string-length: Wrong type argument in position 1 (expecting = string): #f Running guix via ./pre-inst-env gives a more useful backtrace. The reason is that in guix/store.scm (use-modules (ice-9 regex)) (regexp-exec (make-regexp "^/gnu/store/([0-9a-df-np-sv-z]{32})-([^/]+)$") "/gnu/store/bv9py3f2dsa5iw0aijqjv9zxwprcy1nb-fontconfig-2.13= .1.drv") evaluates to #f in Turkish, possibly because of the presence of dotless i (=C4=B1) in the range. The attached patch fixes the issue by including i explicitly, but I believe enumerating all of [0-9abcdfghijklmnpqrsvwxyz] explicitly might be more future-proof. Shall I push the patch modified to list all letters in [0-9abcdfghijklmnpqrsvwxyz] explicitly? Numbers too? I suppose there is no downside to listing all without ranges. I wonder what else is affected; the installer maybe? I have not tested yet. Regards, Florian --n7jv6se5e47ytj2s Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-store-Fix-many-guix-commands-failing-on-some-locales.patch" >From 4445284e9fd40b3e271fa7b511d2856c03c8ccfb Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sat, 7 Mar 2020 11:38:59 +0100 Subject: [PATCH] store: Fix many guix commands failing on some locales. At least 'guix environment', 'guix install' and 'guix pull' on 'az_AZ.utf8' and 'tr_TR.utf8' are affected. * guix/store.scm (store-regexp*): Avoid dependence on locale. --- guix/store.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/store.scm b/guix/store.scm index f99fa581a8..a1d9713c24 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -1949,7 +1949,7 @@ valid inputs." (mlambda (store) "Return a regexp matching a file in STORE." (make-regexp (string-append "^" (regexp-quote store) - "/([0-9a-df-np-sv-z]{32})-([^/]+)$")))) + "/([0-9a-df-hij-np-sv-z]{32})-([^/]+)$")))) (define (store-path-package-name path) "Return the package name part of PATH, a file name in the store." -- 2.25.0 --n7jv6se5e47ytj2s--