diff options
author | Mats Lidell <matsl@gentoo.org> | 2022-06-27 23:33:34 +0200 |
---|---|---|
committer | Mats Lidell <matsl@gentoo.org> | 2022-06-27 23:39:26 +0200 |
commit | a5dbc32a6e327775a55eba8583262d7bb761ec3a (patch) | |
tree | 3a754887cc1dd49c136795400e1daa739f97d4e0 /app-editors/xemacs | |
parent | net-dns/pdns: Cleanup (diff) | |
download | gentoo-a5dbc32a6e327775a55eba8583262d7bb761ec3a.tar.gz gentoo-a5dbc32a6e327775a55eba8583262d7bb761ec3a.tar.bz2 gentoo-a5dbc32a6e327775a55eba8583262d7bb761ec3a.zip |
app-editors/xemacs: No lock on finder-inf creation
Patch from upstream to not use a lock file when creating finder-inf.
Bug: https://bugs.gentoo.org/854417
Signed-off-by: Mats Lidell <matsl@gentoo.org>
Diffstat (limited to 'app-editors/xemacs')
-rw-r--r-- | app-editors/xemacs/files/xemacs-21.5.34-no-lock-on-finder-inf.patch | 99 | ||||
-rw-r--r-- | app-editors/xemacs/xemacs-21.5.34-r9.ebuild | 1 |
2 files changed, 100 insertions, 0 deletions
diff --git a/app-editors/xemacs/files/xemacs-21.5.34-no-lock-on-finder-inf.patch b/app-editors/xemacs/files/xemacs-21.5.34-no-lock-on-finder-inf.patch new file mode 100644 index 000000000000..a37fc5e95fe0 --- /dev/null +++ b/app-editors/xemacs/files/xemacs-21.5.34-no-lock-on-finder-inf.patch @@ -0,0 +1,99 @@ +# HG changeset patch +# User Aidan Kehoe <kehoea@parhasard.net> +# Date 1656333099 -3600 +# Mon Jun 27 13:31:39 2022 +0100 +# Node ID c6966a009d0dc3b546c9d843141c1fb5daa89b9e +# Parent 16e37125d7ea85048e89197ce8fe83f44b00ccc5 +Don't create a lock file when generating finder-inf.el + +lisp/ChangeLog addition: + +2022-06-27 Aidan Kehoe <kehoea@parhasard.net> + + * finder.el (finder-compile-keywords): + Don't use the save-buffer infrastructure when generating + finder-inf.el, since that leads to lock files, making parallel + builds less likely to work. Thank you Mats Lidell and the Gentoo + users! + +src/ChangeLog addition: + +2022-06-27 Aidan Kehoe <kehoea@parhasard.net> + + * Makefile.in.in ($(LISP)/finder-inf.el): + Don't remove finder-inf.el before regenerating it, Lisp will + overwrite it. + +diff -r 16e37125d7ea -r c6966a009d0d lisp/finder.el +--- a/lisp/finder.el Sun Jun 26 19:14:02 2022 +0300 ++++ b/lisp/finder.el Mon Jun 27 13:31:39 2022 +0100 +@@ -151,7 +151,7 @@ + arguments compiles from `load-path'." + (save-excursion + ;; XEmacs change +- (find-file (expand-file-name "finder-inf.el" lisp-directory)) ++ (set-buffer (generate-new-buffer "finder-inf.el")) + (let ((processed nil) + (directory-abbrev-alist + (append +@@ -160,11 +160,12 @@ + ""))) + finder-abbreviate-directory-list) + directory-abbrev-alist)) +- (using-load-path)) ++ using-load-path second-line-marker finder-scratch) + (or dirs (setq dirs load-path)) + (setq using-load-path (equal dirs load-path)) + (erase-buffer) + (insert ";;; finder-inf.el --- keyword-to-package mapping\n") ++ (setq second-line-marker (point-marker)) + (insert ";; Keywords: help\n") + (insert ";;; Commentary:\n") + (insert ";; Don't edit this file. It's generated by finder.el\n\n") +@@ -180,7 +181,8 @@ + (if (not finder-compile-keywords-quiet) + (message "Processing %s ..." f)) + (save-excursion +- (set-buffer (get-buffer-create "*finder-scratch*")) ++ (set-buffer (setq finder-scratch ++ (get-buffer-create "*finder-scratch*"))) + (buffer-disable-undo (current-buffer)) + (erase-buffer) + (insert-file-contents (expand-file-name f d)) +@@ -210,10 +212,23 @@ + (directory-files d nil "^[^=].*\\.el$")))) + dirs) + (insert "))\n\n(provide 'finder-inf)\n\n;;; finder-inf.el ends here\n") +- (kill-buffer "*finder-scratch*") ++ (if finder-scratch (kill-buffer finder-scratch)) + (unless noninteractive + (eval-current-buffer)) ; So we get the new keyword list immediately +- (basic-save-buffer)))) ++ (goto-char (point-min)) ++ (if (re-search-forward "[^\x00-\x7f]" nil t) ++ (progn ++ (goto-char (point-min)) ++ (if (re-search-forward "[^\x00-\xff]" nil t) ++ (progn (goto-char second-line-marker) ++ (insert ";;; -*- coding: escape-quoted -*-\n") ++ (setq buffer-file-coding-system 'iso-8859-1-unix)) ++ (goto-char second-line-marker) ++ (insert ";;; -*- coding: iso-8859-1 -*-\n") ++ (setq buffer-file-coding-system 'escape-quoted-unix))) ++ (setq buffer-file-coding-system 'no-conversion-unix)) ++ (write-region (point-min) (point-max) ++ (expand-file-name "finder-inf.el" lisp-directory))))) + + (defun finder-compile-keywords-make-dist () + "Regenerate `finder-inf.el' for the Emacs distribution." +diff -r 16e37125d7ea -r c6966a009d0d src/Makefile.in.in +--- a/src/Makefile.in.in Sun Jun 26 19:14:02 2022 +0300 ++++ b/src/Makefile.in.in Mon Jun 27 13:31:39 2022 +0100 +@@ -590,7 +590,6 @@ + + $(LISP)/finder-inf.el: update-elc-2 + @echo "Building finder database ..." +- $(RM) $(LISP)/finder-inf.el + $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \ + -eval "(setq lisp-directory \"$(LISP)\")" \ + -l finder -f finder-compile-keywords diff --git a/app-editors/xemacs/xemacs-21.5.34-r9.ebuild b/app-editors/xemacs/xemacs-21.5.34-r9.ebuild index e0099ac478ba..cbf425e1c83b 100644 --- a/app-editors/xemacs/xemacs-21.5.34-r9.ebuild +++ b/app-editors/xemacs/xemacs-21.5.34-r9.ebuild @@ -68,6 +68,7 @@ src_prepare() { eapply "${FILESDIR}/${P}-strsignal.patch" eapply "${FILESDIR}/${P}-process-test-qa.patch" eapply "${FILESDIR}/${P}-autoloads-parallell-make.patch" + eapply "${FILESDIR}/${P}-no-lock-on-finder-inf.patch" eapply_user |