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 iXN3MyihAWCBEgAA0tVLHw (envelope-from ) for ; Fri, 15 Jan 2021 14:05:28 +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 2K+oLiihAWAxNwAAB5/wlQ (envelope-from ) for ; Fri, 15 Jan 2021 14:05:28 +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 290BC9403EB for ; Fri, 15 Jan 2021 14:05:28 +0000 (UTC) Received: from localhost ([::1]:48910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PjC-0006em-W1 for larch@yhetil.org; Fri, 15 Jan 2021 09:05:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0P9y-0004av-WE for guix-patches@gnu.org; Fri, 15 Jan 2021 08:29:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0P9y-00062N-NE for guix-patches@gnu.org; Fri, 15 Jan 2021 08:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0P9y-0001QO-Ig for guix-patches@gnu.org; Fri, 15 Jan 2021 08:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44249] [PATCH] gnu: emacs: Make strip-double-wrap more robust Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 15 Jan 2021 13:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44249 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Morgan.J.Smith@outlook.com Received: via spool by 44249-submit@debbugs.gnu.org id=B44249.16107173175434 (code B ref 44249); Fri, 15 Jan 2021 13:29:02 +0000 Received: (at 44249) by debbugs.gnu.org; 15 Jan 2021 13:28:37 +0000 Received: from localhost ([127.0.0.1]:40136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0P9Y-0001Pa-Pf for submit@debbugs.gnu.org; Fri, 15 Jan 2021 08:28:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0P9Y-0001PO-6D for 44249@debbugs.gnu.org; Fri, 15 Jan 2021 08:28:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57424) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0P9R-0005n6-FK; Fri, 15 Jan 2021 08:28:29 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=39196 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0P9P-0008DS-TB; Fri, 15 Jan 2021 08:28:29 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Fri, 15 Jan 2021 14:28:26 +0100 In-Reply-To: (Morgan J. Smith's message of "Wed, 4 Nov 2020 14:47:13 -0500") Message-ID: <874kjiz5vp.fsf_-_@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44249@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.86 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 290BC9403EB X-Spam-Score: -2.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: +iPdfkLhClKb Hi Morgan, Morgan.J.Smith@outlook.com skribis: > From: Morgan Smith > > * gnu/packages/emacs.scm (emacs) [strip-double-wrap]: Use regex to find e= macs > executable. This works even when the version is changed by package > transformations (e.g., version=3Dgit.master). [...] > (with-directory-excursion (assoc-ref outputs "out") > - (copy-file (string-append > - "bin/emacs-" > - ,(let ((this-version (package-version this-pa= ckage))) > - (or (false-if-exception > - (version-major+minor+point this-versi= on)) > - (version-major+minor this-version)))) > - "bin/emacs") > + (copy-file > + (match (find-files "bin" "^emacs-") > + ((executable . _) executable)) If we assume there should be just one =E2=80=9C^emacs-=E2=80=9D executable,= you can change the match clause to reflect it: (match (find-files "bin" "^emacs-") ((executable) executable)) To be even more defensive, you could refine the regexp to =E2=80=9C^emacs-[0-9]=E2=80=9D. > + "bin/emacs") [...] > + ((#:modules modules) > + `((guix build gnu-build-system) > + (guix build utils) > + (ice-9 match))))) Unless I=E2=80=99m missing something, you don=E2=80=99t need to repeat #:mo= dules in every variant: the =E2=80=98arguments=E2=80=99 field is inherited by those = variants, and that includes #:modules. You can check easily that re-adding #:modules has no effect by checking the output of, say: ./pre-inst-env guix build emacs-xwidgets -d --no-grafts before and after removing the ((#:modules modules) =E2=80=A6) bit. Could you send an updated patch? This is the last missing bit before one can run things like: guix install emacs-next --with-branch=3Demacs-next=3Dmaster :-) Thanks, Ludo=E2=80=99.