all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: adam.porter@47ap.net, philipk@posteo.net, 65666@debbugs.gnu.org
Subject: bug#65666: Lockfiles break package-vc-install-from-checkout
Date: Sat, 02 Sep 2023 10:15:48 -0700	[thread overview]
Message-ID: <87cyz0mr6c.fsf@breatheoutbreathe.in> (raw)
In-Reply-To: <83msy59fql.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]


Eli Zaretskii <eliz@gnu.org> writes:
> Or make the REGEXP argument to directory-files-recursively more
> specific, to reject lock files.
>
> But yes, the use of file-exists-p is not TRT, IMO.

See patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Don-t-native-compile-lock-files.patch --]
[-- Type: text/x-diff, Size: 1169 bytes --]

From 31ea77e547e333c8e216d759c1c26ad1fe6c4df0 Mon Sep 17 00:00:00 2001
From: Joseph Turner <joseph@breatheoutbreathe.in>
Date: Sat, 2 Sep 2023 10:14:22 -0700
Subject: [PATCH] Don't native compile lock files

* lisp/emacs-lisp/package.el (package--delete-directory):
Exclude lock files in regex.
---
 lisp/emacs-lisp/package.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index e1172d69bf0..8bc7936a5bf 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2484,7 +2484,9 @@ Clean-up the corresponding .eln files if Emacs is native
 compiled."
   (when (featurep 'native-compile)
     (cl-loop
-     for file in (directory-files-recursively dir "\\.el\\'")
+     for file in (directory-files-recursively dir
+                                              ;; Exclude lockfiles
+                                              (rx bos (or (and "." (not "#")) (not ".")) (* nonl) ".el" eos))
      do (comp-clean-up-stale-eln (comp-el-to-eln-filename file))))
   (if (file-symlink-p (directory-file-name dir))
       (delete-file (directory-file-name dir))
-- 
2.41.0


  reply	other threads:[~2023-09-02 17:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 21:47 bug#65666: Lockfiles break package-vc-install-from-checkout Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-01  5:50 ` Eli Zaretskii
2023-09-01  6:18 ` joseph--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-01 12:52   ` Philip Kaludercic
2023-09-01 23:43     ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-02  7:49       ` Eli Zaretskii
2023-09-02 17:15         ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-09-02 17:21           ` Eli Zaretskii
2023-09-03  7:03             ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cyz0mr6c.fsf@breatheoutbreathe.in \
    --to=bug-gnu-emacs@gnu.org \
    --cc=65666@debbugs.gnu.org \
    --cc=adam.porter@47ap.net \
    --cc=eliz@gnu.org \
    --cc=joseph@breatheoutbreathe.in \
    --cc=philipk@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.