From: Philip Kaludercic <philipk@posteo.net>
To: Allen Li <darkfeline@felesatra.moe>
Cc: 68678@debbugs.gnu.org
Subject: bug#68678: 29.1; package-recompile-all should skip system packages in package-directory-list
Date: Wed, 24 Jan 2024 22:17:31 +0000 [thread overview]
Message-ID: <87jznyfkas.fsf@posteo.net> (raw)
In-Reply-To: <CADbSrJyYvAiO-dmFK-uhp39gwubf5SzDeP1TtrLEOvZc3SgLLQ@mail.gmail.com> (Allen Li's message of "Tue, 23 Jan 2024 15:48:35 -0800")
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]
Allen Li <darkfeline@felesatra.moe> writes:
> package-recompile-all currently attempts to recompile all packages,
> including the system packages listed in package-directory-list.
>
> System packages are generally byte compiled as part of installation, and
> are not writeable by normal users.
>
> package-recompile-all attempts to recompile these, which will almost
> certainly error out due to this.
>
> It would be better if package-recompile-all only tries user installed
> packages (in package-user-dir), which are more likely to need
> recompilation. Perhaps as a prefix arg option?
Would this patch resolve the issue for you:
[-- Attachment #2: Type: text/plain, Size: 521 bytes --]
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 868373f46c2..fe7b10f569a 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2610,7 +2610,8 @@ package-recompile-all
are invalid due to changed byte-code, macros or the like."
(interactive)
(pcase-dolist (`(_ ,pkg-desc) package-alist)
- (package-recompile pkg-desc)))
+ (with-demoted-errors "Error while recompiling: %S"
+ (package-recompile pkg-desc))))
;;;###autoload
(defun package-autoremove ()
[-- Attachment #3: Type: text/plain, Size: 205 bytes --]
> In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
> cairo version 1.16.0) of 2023-09-03, modified by Debian built on
> kokoro-ubuntu
> System Description: Debian GNU/Linux rodete
next prev parent reply other threads:[~2024-01-24 22:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 23:48 bug#68678: 29.1; package-recompile-all should skip system packages in package-directory-list Allen Li
2024-01-24 22:17 ` Philip Kaludercic [this message]
2024-01-25 22:58 ` Allen Li
2024-01-28 21:40 ` Philip Kaludercic
2024-02-02 8:10 ` Allen Li
2024-02-06 19:13 ` Philip Kaludercic
2024-02-11 21:52 ` 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=87jznyfkas.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=68678@debbugs.gnu.org \
--cc=darkfeline@felesatra.moe \
/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.