From: Stefan Monnier Date: Sat, 3 Sep 2022 15:03:01 +0000 (-0400) Subject: Emacs should no longer crash when the eln-cache isn't writable X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~89^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6a1aaa00c94b1516c8c098322af5a591e7c35341;p=emacs.git Emacs should no longer crash when the eln-cache isn't writable This upstream patch has been incorporated to fix the problem: * lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail more gracefully Otherwise Emacs may fail to start if it can't find a writable `~/.emacs.d/eln-cache` directory. Fixes bug#57562. See also Debian's bug #1017739. Origin: upstream, commit: aad38d6010d9eef07685fa52ce93bcf70512f88b Bug: https://bugs.gnu.org/57562 Bug-Debian: http://bugs.debian.org/1017739 Forwarded: not-needed --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index a363bed3642..e14486e026e 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3925,8 +3925,11 @@ display a message." when (or native-comp-always-compile load ; Always compile when the compilation is ; commanded for late load. - (file-newer-than-file-p - source-file (comp-el-to-eln-filename source-file))) + ;; Skip compilation if `comp-el-to-eln-filename' fails + ;; to find a writable directory. + (with-demoted-errors "Async compilation :%S" + (file-newer-than-file-p + source-file (comp-el-to-eln-filename source-file)))) do (let* ((expr `((require 'comp) ,(when (boundp 'backtrace-line-length) `(setf backtrace-line-length ,backtrace-line-length))