From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65666: Lockfiles break package-vc-install-from-checkout Date: Sat, 02 Sep 2023 10:15:48 -0700 Message-ID: <87cyz0mr6c.fsf@breatheoutbreathe.in> References: <83edjicui8.fsf@gnu.org> <87edjiop5o.fsf@breatheoutbreathe.in> <87o7imvywn.fsf@posteo.net> <87ledpmp8f.fsf@breatheoutbreathe.in> <83msy59fql.fsf@gnu.org> Reply-To: Joseph Turner Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37160"; mail-complaints-to="usenet@ciao.gmane.io" Cc: adam.porter@47ap.net, philipk@posteo.net, 65666@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 02 19:17:10 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qcUFC-0009Pv-4Z for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Sep 2023 19:17:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcUEx-000829-5u; Sat, 02 Sep 2023 13:16:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcUEv-00081b-9b for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 13:16:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qcUEv-0003hZ-1M for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 13:16:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qcUF4-0005Lt-Cj for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2023 13:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Joseph Turner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Sep 2023 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65666 X-GNU-PR-Package: emacs Original-Received: via spool by 65666-submit@debbugs.gnu.org id=B65666.169367501420555 (code B ref 65666); Sat, 02 Sep 2023 17:17:02 +0000 Original-Received: (at 65666) by debbugs.gnu.org; 2 Sep 2023 17:16:54 +0000 Original-Received: from localhost ([127.0.0.1]:38532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcUEv-0005LS-Pu for submit@debbugs.gnu.org; Sat, 02 Sep 2023 13:16:54 -0400 Original-Received: from out-239.mta1.migadu.com ([95.215.58.239]:52051) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcUEp-0005LF-PS for 65666@debbugs.gnu.org; Sat, 02 Sep 2023 13:16:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1693674996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8CQq47QCtvG1gskNMcWLV0FIFlk3bGq68iCiHh7ibks=; b=jJ7gAbRE2wIdQUd6o1ERrH+iTY0T/t1PDKss1ObzZr8TeavrwemVgtT725YyCucmxV8vN7 Ie+S01fCHt0ZAMOrY+FcVGr7dlrddBWFqxS24oWDwn1RxlqDQQO4J3OmlKV92qRZgPx/b2 VqoCNQaflJT09sWmaVtqRWh36Wlkag8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <83msy59fql.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269033 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii 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. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Don-t-native-compile-lock-files.patch >From 31ea77e547e333c8e216d759c1c26ad1fe6c4df0 Mon Sep 17 00:00:00 2001 From: Joseph Turner 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 --=-=-=--