From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6ElGI08Dnl8GbAAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 00:37:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id iG8HH08Dnl+nGwAAB5/wlQ (envelope-from ) for ; Sun, 01 Nov 2020 00:37:35 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id ED1CE9403A0 for ; Sun, 1 Nov 2020 00:37:34 +0000 (UTC) Received: from localhost ([::1]:55874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZ1NF-0005LS-Cv for larch@yhetil.org; Sat, 31 Oct 2020 20:37:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZ1Ml-0005LL-Ay for bug-guix@gnu.org; Sat, 31 Oct 2020 20:37:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZ1Mj-00045k-VA for bug-guix@gnu.org; Sat, 31 Oct 2020 20:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZ1Mj-0005lA-SI for bug-guix@gnu.org; Sat, 31 Oct 2020 20:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44196: [PATCH v6 3/4] system: Do not depend on locale folder generated by Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 01 Nov 2020 00:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44196 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 44196-submit@debbugs.gnu.org id=B44196.160419100822116 (code B ref 44196); Sun, 01 Nov 2020 00:37:01 +0000 Received: (at 44196) by debbugs.gnu.org; 1 Nov 2020 00:36:48 +0000 Received: from localhost ([127.0.0.1]:34966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ1MW-0005ke-4i for submit@debbugs.gnu.org; Sat, 31 Oct 2020 20:36:48 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:36120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZ1MU-0005kQ-7g for 44196@debbugs.gnu.org; Sat, 31 Oct 2020 20:36:47 -0400 Received: by mail-wr1-f45.google.com with SMTP id x7so10461472wrl.3 for <44196@debbugs.gnu.org>; Sat, 31 Oct 2020 17:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=NXxWmgX2tWGajwnVBFEW/8PXzE0BbfHPtmUw28R7QZo=; b=avtI0TJMSdQhCC9AcvPhjnHQ0KVafJsIwb65e51mhZKR3Gs3aHT7+Y5xdfOTv/ik/b qVpuQGVqWhTJFcW5LN+hj562QfdLphdsuVzLiJ594V3rOvoiJb+98bq8iLqHpfsVlwLc R9EVXJO2+ry1fULy4iw5NEYg9EWfw2//QimojcCz0+fa7IeUI2qvXKrNbPB50k8tSHoM Gl6w3G2wUvf3bfKIN+0oqSp4g9Zpu8AkbivsCXUQw8UxCunViwzdjHYbctW3sM5IMdI9 g7eVuqG50Wo45ldDzdVjq6P56oeqF+/cNEDjzgohpH94+H61iuMbHTQte6FvcBH62y7P mj0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=NXxWmgX2tWGajwnVBFEW/8PXzE0BbfHPtmUw28R7QZo=; b=TwIW6mQW8dP1r9XBi36ifnqetP6AoiDDOu9DeffBlBIGN54nZCaHQj6z8kNP5/iqI0 dDsYlHbtUBaTPNRRTVqDfiDi3PrDrkwy2wuf3QG8afLFrDHUTk0PfuCeXXJ5AmXWmnTR j6h7UvG9Ipn73eSwTEW+C0/Q7DeympS2FLq4lAoh0HKyqvQk9ErhkSY2aUWpfLhvZ6ui Sy8pF6ysvgoQ5rlumIVo75xePbQ5SJxGgaUoxUgLgG4IJExpGGwRxVdhMkZ8bg7S4etg DhJ1bAS3SFAndde4T54DbTVrxgffyAHcsxMWBSd1tqqAKkhLhq6IiYCVtnyp8I9WLE34 TPIQ== X-Gm-Message-State: AOAM530pgBZ6J+seXHCd7Y/hPDbTIouAUCrjgu6V+goox6G2Nw4YxvUM QE6lv519Y4Wb79s521415Yp98M4QOPHURA== X-Google-Smtp-Source: ABdhPJzKhEPp2TCHIY08onU4ChNeMivEOCujqBAchKYUSsWMgoTXkt7/0xUE6gM0py+b2PxUikhi6A== X-Received: by 2002:adf:e490:: with SMTP id i16mr12471545wrm.178.1604190999970; Sat, 31 Oct 2020 17:36:39 -0700 (PDT) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id b7sm15561535wrp.16.2020.10.31.17.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Oct 2020 17:36:39 -0700 (PDT) From: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas References: <878sbvh5j4.fsf@gmail.com> <87tuujfhum.fsf@gmail.com> <87imay7hax.fsf_-_@gmail.com> <87y2jsod97.fsf_-_@gmail.com> <87v9eum3w2.fsf_-_@gmail.com> <87mu0360qt.fsf_-_@gmail.com> <87a6w35qx2.fsf_-_@gmail.com> <875z6qt6i2.fsf@gnu.org> Date: Sun, 01 Nov 2020 01:36:38 +0100 In-Reply-To: <875z6qt6i2.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 31 Oct 2020 22:44:53 +0100") Message-ID: <87tuu93obt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.8 (/) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44196@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=avtI0TJM; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: ykUj7/6njcZ6 =C2=A1Hola, Ludo! Thanks for your comments. Reviewing them I found some more issues that I address inline: Ludovic Court=C3=A8s writes: > Miguel =C3=81ngel Arruga Vivas skribis: > >> From 5886bdf74bda59649b3d17b691132d9d030e0fb4 Mon Sep 17 00:00:00 2001 >> From: =3D?UTF-8?q?Miguel=3D20=3DC3=3D81ngel=3D20Arruga=3D20Vivas?=3D >> >> Date: Sat, 24 Oct 2020 20:36:21 +0200 >> Subject: [PATCH] system: Do not depend on locale folder generated by >> grub-install. I've changed the title to "system: Generate grub locale directory for grub.cfg.", which is positive, shorter and more descriptive. I have to work on my communicative skills a lot... >> >> * gnu/bootloader/grub.scm (define-module): Use (guix packages). This was a leftover from the modification of Grub itself instead of using computed-file and not needed anymore, removed. >> (grub-locale-folder): New computed folder. >> (grub-configuration-file)[locale-config]: Use grub-locale-folder only wh= en a >> locale is needed. Changed with the new names and added an explanation about the search. > > [...] > >> +(define (grub-locale-folder grub) >> + "Generate a folder with the locales from GRUB." > > s/folder/directory/ :-) Applied, both in the function name and the documentation string. >> + (define builder >> + #~(begin >> + (use-modules (ice-9 ftw)) >> + (let ((locale (string-append #$grub "/share/locale")) >> + (out #$output)) >> + (mkdir out) >> + (chdir out) >> + (for-each (lambda (lang) >> + (let ((file (string-append locale "/" lang >> + "/LC_MESSAGES/grub.mo"= )) >> + (dest (string-append lang ".mo"))) >> + (when (file-exists? file) >> + (copy-file file dest)))) >> + (scandir locale))))) >> + (computed-file "grub-boot-locale" builder)) > > Maybe just =E2=80=9Cgrub-locales=E2=80=9D? This name sounds right, applied too. :-) >> + (let* ((entry (first all-entries)) >> + (device (menu-entry-device entry)) >> + (mount-point (menu-entry-device-mount-point entry)) >> + (bootloader (bootloader-configuration-bootloader config)) >> + (grub (bootloader-package bootloader)) >> + (locale-dir (normalize-file (grub-locale-folder grub) >> + mount-point >> + store-directory-prefix))) > > Nitpick: maybe s/locale-dir/locales/ Applied too, but I moved this call from the let* to ... >> + #~(let ((locale #$(and locale >> + (locale-definition-source >> + (locale-name->definition locale)))) >> + (locale-dir #$(and locale locale-dir))) ... here, to avoid the generation when there is no locale, which shouldn't be a common use case, but it shouldn't depend on the generation of that directory because it won't be used. >> + (when locale >> + (format port "\ >> # Localization configuration. >> -if search --file --set boot_partition /grub/grub.cfg; then >> - set locale_dir=3D(${boot_partition})/grub/locale >> -else >> - set locale_dir=3D/boot/grub/locale >> -fi >> -set lang=3D~a~%" locale)))) >> +~asearch --file --set ~a/en@quot.mo >> +set locale_dir=3D~a >> +set lang=3D~a~%" > > Otherwise LGTM, thanks! Thank you again for the review. Pushed as f445bc65764ffad2ae9f3b382ddb8feb4eeea2fb with these fixes, after running again make check and a subset of make check-system. Happy hacking! Miguel