GNU bug report logs -
#68678
29.1; package-recompile-all should skip system packages in package-directory-list
Previous Next
Reported by: Allen Li <darkfeline <at> felesatra.moe>
Date: Tue, 23 Jan 2024 23:50:02 UTC
Severity: normal
Found in version 29.1
Done: Philip Kaludercic <philipk <at> posteo.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Allen Li <darkfeline <at> 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:
[Message part 2 (text/plain, inline)]
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 ()
[Message part 3 (text/plain, inline)]
> 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
This bug report was last modified 1 year and 157 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.