From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id pfdkG38Sb2GirAAAgWs5BA (envelope-from ) for ; Tue, 19 Oct 2021 20:46:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8BvZFX8Sb2EGJgAA1q6Kng (envelope-from ) for ; Tue, 19 Oct 2021 18:46:23 +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 E975B2EA63 for ; Tue, 19 Oct 2021 20:46:22 +0200 (CEST) Received: from localhost ([::1]:53682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcu7y-0000d9-0H for larch@yhetil.org; Tue, 19 Oct 2021 14:46:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcu7e-0000ct-92 for bug-guix@gnu.org; Tue, 19 Oct 2021 14:46:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcu7d-0000uG-VR for bug-guix@gnu.org; Tue, 19 Oct 2021 14:46:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mcu7d-00030f-MX for bug-guix@gnu.org; Tue, 19 Oct 2021 14:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51258: [PATCH] gnu: emacs: Handle pdump filenames that contain a fingerprint Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 19 Oct 2021 18:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51258 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Morgan.J.Smith@outlook.com, 51258@debbugs.gnu.org, paxton@riseup.net Received: via spool by 51258-submit@debbugs.gnu.org id=B51258.163466911411500 (code B ref 51258); Tue, 19 Oct 2021 18:46:01 +0000 Received: (at 51258) by debbugs.gnu.org; 19 Oct 2021 18:45:14 +0000 Received: from localhost ([127.0.0.1]:52002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcu6r-0002zL-PT for submit@debbugs.gnu.org; Tue, 19 Oct 2021 14:45:14 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcu6p-0002ys-8c for 51258@debbugs.gnu.org; Tue, 19 Oct 2021 14:45:12 -0400 Received: by mail-wm1-f67.google.com with SMTP id p21so13655635wmq.1 for <51258@debbugs.gnu.org>; Tue, 19 Oct 2021 11:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=5iHNXQhJYWtUmb9lpPmfUVhgVZJDLgpTuen7mnEeSsw=; b=OHlHYylEikx1hx2buHPXt+ZfkQRfiH9wzHJ88mJVcrswBDP+xsBHWwrQKlk02ha10v 4UdGWRDvMT4+KTX1tdb6+u1ZnF3qtlg5JKjDmrX5EAdmp3uudhZvVHwDPXKWJtwr2PU9 UkCYzXl/27gdDYn12dP9iO8TX4vbhcI66GuiKUtmKSliZqwcwqWFBC3N49T6gckQe0Qd 2thWEp8qyDbwA8zNTPOor9vBfekHib3gVAUNE5BgBJnqkkhxWafYhBTMp0rWJc2/y9pv nVAE7JK/riavfRPBQggRZGsRSaeEe1k1WK3UD6riOJZ+YH3RkIQtiJPuSislziQA2T/4 aT7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=5iHNXQhJYWtUmb9lpPmfUVhgVZJDLgpTuen7mnEeSsw=; b=L+NGuUYoNzbW+b4KbOMI866TrZR/jJHzbYkE0Ai9iPugkH2jdf3Tdip4JWEFavgR9z hb7d09ie0oa7hAtcqR6NRzK7ywukv5BDmJFquKO+IiE4vS5HOzNr6B4fPtK1UfI7Z7qf JfrrzXolLZIngO6ohVj9qteINqXptSK/8wMybAinQCHk/RkCVeYFtI9RTUi2IMUlmI5/ Ai8o469riJ1ntRqgGHlwI1JSg519YscyCHpMItG1GtIPAh4ewTdJrYz2F9WZTWXhO1rH 56P9jjFe9pz8VjXieLhNpblLbcZ5mFOw3lBgmm8avQC2fZjNRW9PSo4O8lYaBKTzFDS/ ksAw== X-Gm-Message-State: AOAM530gWB1BR7y8+l+5IibXwXvBFtLZRVMjgb5MBkgDgyjPQaab3OUI 5zgKTVEkQgRLqoJzxqREfHw= X-Google-Smtp-Source: ABdhPJwLehKRU3h+/f4iSb+/gV+/2oAitM6toKrtbxOpn/Sko3U2Q82pLSi4+hpgZjuOJJXx4jmewg== X-Received: by 2002:a05:6000:1acd:: with SMTP id i13mr46085460wry.351.1634669105221; Tue, 19 Oct 2021 11:45:05 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id i8sm12391522wrv.47.2021.10.19.11.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 11:45:04 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Tue, 19 Oct 2021 20:45:03 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634669183; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5iHNXQhJYWtUmb9lpPmfUVhgVZJDLgpTuen7mnEeSsw=; b=p+6QT8X/tLWhqREBCOztMYjYDhlZBJi/JjR25tdgFyKdo5F8BRABcW90vjG0N40wgZV88S 0hMWkShxnXWrg8QOh/Vqs7GibMAlx872m3ChXzOyOjoAxZpROyXJAcDms07CyTnKrNdliV TzgtUn4AkRGNztWG7Ns1aJQBoyqMzUCkBWWqlrqQ2MqTsHyDFLROUaOWHvewyrp5Bt6VQY F9bZYL3tzX50cqNLGPJgASOvAv+bRIfkEUesEAy9Zy2UPAD32QO6k7pCEL0gKiSfOqwJEu VnNiViLsjKNCcSgENhci5AKQ+Xk+S2/VBL7uWE+xzMPGxXYyibO76s3xdSzCsQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634669183; a=rsa-sha256; cv=none; b=SK1tUtJZlIqjLvy7S8fEc7zeLAYzyGLMHOuVBD4MXFz/n3jKFbWQeU+aD9OqSQXwMEYROp okJ8cBrd7vxnlp10E0cyhJLd3z8J5NiClIuNmegH8lF9Xj/nlw/eNXH4kgtDmxfYp5Rhnq kJjuAbDY1oHT5dyfutmRGhztRyhy3aawcipGttFEPT9nzDLMbsqi2kyNG528zvNNmNKqVz vv1tUK2V4fTj8yvwxYoBg5J1Vg0+WbaS8dtsuB7Ri3z1iZEePYaYexDRAwKHBellizhx6a LqZG9+iixHFCifaPNk05s/RYGx81lBEHEkXe+rJY4FyAVzq/Mpx3TVD+rwP6Eg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=OHlHYylE; 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-Migadu-Spam-Score: -1.73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=OHlHYylE; 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-Migadu-Queue-Id: E975B2EA63 X-Spam-Score: -1.73 X-Migadu-Scanner: scn1.migadu.com X-TUID: 3l3gNSuEOM8m Hi, Am Montag, den 18.10.2021, 19:50 -0400 schrieb Morgan.J.Smith@outlook.com: > From: Morgan Smith > > * gnu/packages/emacs.scm (emacs) [restore-emacs-pdmp]: Add regex to > handle > filenames that have a fingerprint in them > --- > > Fixed your problem. Well it was also my problem. The regex is > pretty simple but probably a little intimidating if you've never done > it before. I highly recommend reading up on ERE's and BRE's from the > POSIX specification if you have time. I still don't exactly know how > guile does regex but knowing POSIX regex has served me quite well. > > I've tested this patch and it works great for me on the latest emacs > commit. It should also be backwards compatible so that's nice. > > > gnu/packages/emacs.scm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm > index 6d9950d068..6ebcfecbc7 100644 > --- a/gnu/packages/emacs.scm > +++ b/gnu/packages/emacs.scm > @@ -183,9 +183,10 @@ (define* (emacs-byte-compile-directory dir) > (let* ((libexec (string-append (assoc-ref outputs > "out") > "/libexec")) > ;; each of these find-files should return one > file > - (pdmp (find-files libexec "^emacs\\.pdmp$")) > + ;; there might be a fingerprint in the name > + (pdmp (find-files libexec "^emacs(- > [[:xdigit:]]+)?\\.pdmp$")) > (pdmp-real (find-files libexec > - "^\\.emacs\\.pdmp- > real$"))) > + "^\\.emacs(- > [[:xdigit:]]+)?\\.pdmp-real$"))) > (for-each (lambda (wrapper real) > (delete-file wrapper) > (rename-file real wrapper)) Hi, this might sound somewhat odd, but I think this solution could be a little over-engineered (also it does not match the case where the version is an actual version rather than a git hash). Perhaps instead we ought to simply look for the .pdmp-real suffix, construct the old file name and move the file back. WDYT?