From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:44735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYuWn-0000vY-Ls for guix-patches@gnu.org; Thu, 06 Jun 2019 11:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYuWg-0005Vj-C5 for guix-patches@gnu.org; Thu, 06 Jun 2019 11:42:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hYuWg-0005Uv-2r for guix-patches@gnu.org; Thu, 06 Jun 2019 11:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hYuWf-0005vt-MW for guix-patches@gnu.org; Thu, 06 Jun 2019 11:42:01 -0400 Subject: [bug#36112] [PATCH] gnu: aspell.scm: Fix dictionaries with underscore/uppercase in name. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <871s07jmi9.fsf@zete.tk> Date: Thu, 06 Jun 2019 17:41:22 +0200 In-Reply-To: <871s07jmi9.fsf@zete.tk> ("Jens \=\?utf-8\?Q\?M\=C3\=B8lgaard\=22's\?\= message of "Thu, 06 Jun 2019 17:44:46 +1200") Message-ID: <87tvd2lo0t.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Jens =?UTF-8?Q?M=C3=B8lgaard?= Cc: 36112@debbugs.gnu.org Salut=C2=A0! :-) Jens M=C3=B8lgaard skribis: > This could be fixed by changing either the way package names or URLs are > generated. Rather than adapting URLs to special cases, it seems more > straightforward to let the dict-name string represent upstream name, and > then downcase and replace underscores to produce a package name in > accordance with the naming conventions. > > This was the simplest/easiest thing I could come up with. Do let me know > if there is a smarter way! This looks like the right way to me! > From 2bc4b7b31004642fcf300fe49f7b27ebd0353774 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Jens=3D20M=3DC3=3DB8lgaard?=3D > Date: Thu, 6 Jun 2019 17:06:56 +1200 > Subject: [PATCH] gnu: aspell.scm: Fix dictionaries with underscore/upperc= ase > in name. > > --- > gnu/packages/aspell.scm | 14 ++++++++++---- Please provide a ChangeLog-style commit log. :-) https://gnu.org/software/guix/manual/en/html_node/Submitting-Patches.html > + (name (string-append > + "aspell-dict-" > + (regexp-substitute/global > + ;; Downcase and replace underscore in package names=20 > + ;; to follow Guix naming conventions. > + #f "_" (string-downcase dict-name) 'pre "-" 'post))) What about avoiding regexps with something like: (string-map (match-lambda (#\_ #\-) (chr chr)) (string-downcase dict-name)) ? Thanks, Ludo=E2=80=99.