Don't crash when the ~/.emacs.d/eln-cache isn't writable
authorRob Browning <rlb@defaultvalue.org>
Tue, 27 Sep 2022 01:24:16 +0000 (20:24 -0500)
committerRob Browning <rlb@defaultvalue.org>
Tue, 27 Sep 2022 01:24:31 +0000 (20:24 -0500)
Add 0010-Emacs-should-no-longer-crash-when-the-eln-cache-isn-.patch to
fix the problem.

Thanks to David Bremner for helping pursue the issue.

1  2 
debian/.git-dpm
debian/patches/0010-Emacs-should-no-longer-crash-when-the-eln-cache-isn-.patch
debian/patches/series

diff --cc debian/.git-dpm
index 426b411bfca6f0c1b241436adfe08093f5baaa90,0000000000000000000000000000000000000000..5a91f2911e89ce496e85ab38e6308a352382a8ec
mode 100644,000000..100644
--- /dev/null
@@@ -1,8 -1,0 +1,8 @@@
- f6b6b6975ffeeecba494ac8a355a912977bb7e07
- f6b6b6975ffeeecba494ac8a355a912977bb7e07
 +# see git-dpm(1) from git-dpm package
++6a1aaa00c94b1516c8c098322af5a591e7c35341
++6a1aaa00c94b1516c8c098322af5a591e7c35341
 +659adb1b2432fd5af3b8c78d2bcb95904d278591
 +659adb1b2432fd5af3b8c78d2bcb95904d278591
 +emacs_28.1+1.orig.tar.xz
 +5d15c81727fdd2ce9bf96a31f85be303d5b27d85
 +26956456
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..6ed50e39b67252069c2ed04c7eda65a07c7cbd98
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,39 @@@
++From 6a1aaa00c94b1516c8c098322af5a591e7c35341 Mon Sep 17 00:00:00 2001
++From: Stefan Monnier <monnier@iro.umontreal.ca>
++Date: Sat, 3 Sep 2022 11:03:01 -0400
++Subject: 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
++---
++ lisp/emacs-lisp/comp.el | 7 +++++--
++ 1 file changed, 5 insertions(+), 2 deletions(-)
++
++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 @@ comp-run-async-workers
++          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))
index 3ba43a32e45609ecb2760e5f724252e322267fa3,0000000000000000000000000000000000000000..d70a11c9f2fad60cc71f72fc9dbf806826fbc79a
mode 100644,000000..100644
--- /dev/null
@@@ -1,9 -1,0 +1,10 @@@
 +0001-Prefer-usr-share-info-emacs.patch
 +0002-Run-debian-startup-and-set-debian-emacs-flavor.patch
 +0003-Remove-files-that-appear-to-be-incompatible-with-the.patch
 +0004-Adjust-documentation-references-for-Debian.patch
 +0005-Modify-the-output-of-version-to-indicate-Debian-modi.patch
 +0006-Don-t-try-to-build-src-macuvs.h-via-IVD_Sequences.tx.patch
 +0007-Kill-gpg-agent-in-package-test.el-to-avoid-a-race.patch
 +0008-Mark-vc-bzr-test-fauilt-bzr-autoloads-as-unstable-fo.patch
 +0009-pdumper-set-DUMP_RELOC_ALIGNMENT_BITS-1-for-m68k.patch
++0010-Emacs-should-no-longer-crash-when-the-eln-cache-isn-.patch