From patchwork Thu Feb 14 22:21:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 1090 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6F26016C42; Thu, 14 Feb 2019 22:22:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 34C2116C2C for ; Thu, 14 Feb 2019 22:22:15 +0000 (GMT) Received: from localhost ([127.0.0.1]:56035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guPOY-0004rO-R3 for patchwork@mira.cbaines.net; Thu, 14 Feb 2019 17:22:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guPOQ-0004oC-BZ for guix-patches@gnu.org; Thu, 14 Feb 2019 17:22:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guPOM-0007bj-K7 for guix-patches@gnu.org; Thu, 14 Feb 2019 17:22:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49176) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guPOL-0007b9-Tr for guix-patches@gnu.org; Thu, 14 Feb 2019 17:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1guPOL-00076J-Nr for guix-patches@gnu.org; Thu, 14 Feb 2019 17:22:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34480] [PATCH 1/2] self: Bundle 'glibc-utf8-locales'. References: <20190214221715.10714-1-ludo@gnu.org> In-Reply-To: <20190214221715.10714-1-ludo@gnu.org> Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Feb 2019 22:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34480 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34480@debbugs.gnu.org Received: via spool by 34480-submit@debbugs.gnu.org id=B34480.155018289627258 (code B ref 34480); Thu, 14 Feb 2019 22:22:01 +0000 Received: (at 34480) by debbugs.gnu.org; 14 Feb 2019 22:21:36 +0000 Received: from localhost ([127.0.0.1]:48455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guPNw-00075Z-GP for submit@debbugs.gnu.org; Thu, 14 Feb 2019 17:21:36 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:59488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guPNu-00075L-QM for 34480@debbugs.gnu.org; Thu, 14 Feb 2019 17:21:35 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6B033FCEA; Thu, 14 Feb 2019 23:21:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z5c9KYFbMEg2; Thu, 14 Feb 2019 23:21:32 +0100 (CET) Received: from gnu.org (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 26135FCC7; Thu, 14 Feb 2019 23:21:32 +0100 (CET) From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 14 Feb 2019 23:21:19 +0100 Message-Id: <20190214222120.10914-1-ludo@gnu.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This minimizes the risk of locale-related warnings, at least for those who use one of the bundled UTF-8 locales. * guix/self.scm (guix-command)[glibc-utf8-locales]: New variable. In program body, set GUIX_LOCPATH. --- guix/self.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/guix/self.scm b/guix/self.scm index a45470a0a6..bcf04a1b28 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -390,6 +390,10 @@ that provide Guile modules." guile (guile-version (effective-version))) "Return the 'guix' command such that it adds MODULES and DEPENDENCIES in its load path." + (define glibc-utf8-locales + (module-ref (resolve-interface '(gnu packages base)) + 'glibc-utf8-locales)) + (define module-directory ;; To minimize the number of 'stat' calls needed to locate a module, ;; create the union of all the module directories. @@ -410,6 +414,16 @@ load path." "/site-ccache") %load-compiled-path)) + ;; To maximize the chances that locales are set up right + ;; out-of-the-box, bundle "common" UTF-8 locales. + (let ((locpath (getenv "GUIX_LOCPATH"))) + (setenv "GUIX_LOCPATH" + (string-append (if locpath + (string-append locpath ":") + "") + #$(file-append glibc-utf8-locales + "/lib/locale")))) + (let ((guix-main (module-ref (resolve-interface '(guix ui)) 'guix-main))) #$(if source