GNU bug report logs -
#48181
incremental autoloads update can put output in wrong file
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Mon, 3 May 2021 01:10:01 UTC
Severity: normal
Found in version 28.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Package: emacs
Version: 28.0.50
I tried to figure out exactly why 68bf917896 caused non-bootstrap builds
to fail, because IIUC in theory it shouldn't have. I think this is why:
1) before 68bf917896, lisp/loaddefs.el contains sections like this:
;;;### (autoloads nil "texnfo-upd" "textmodes/texnfo-upd.el" (0 0
;;;;;; 0 0))
;;; Generated autoloads from textmodes/texnfo-upd.el
(register-definition-prefixes "texnfo-upd" '("texinfo-"))
So even though there aren't any real autoloads in texnfo-upd.el, it's
not in the "no autoloads" section.
2) 68bf917896 added real autoload cookies to texnfo-upd.el, and set
generated-autoload-file to texinfo-loaddefs.el.
3) make-directory-autoloads correctly finds that texnfo-upd.el is newer
than loaddefs.el, so we execute this branch:
(t
(setq changed t)
(autoload-remove-section (match-beginning 0))
(if (autoload-generate-file-autoloads
;; Passing `current-buffer' makes it insert at point.
file (current-buffer) buffer-file-name)
(push file no-autoloads)))
Because a non-nil OUTBUF is passed to autoload-generate-file-autoloads,
it ignores the buffer-local setting for generated-autoload-file,
and so puts the autoloads in the main loaddefs.el file, which is wrong.
In contrast, if the input loaddefs.el file in step 1 had texnfo-upd.el
in the "no loaddefs" section, then we would execute this branch:
;; Passing nil as second argument forces
;; autoload-generate-file-autoloads to look for the right
;; spot where to insert each autoloads section.
((setq file-time
(autoload-generate-file-autoloads file nil buffer-file-name))
As the comment says, this version has OUTBUF nil, so the loaddefs end up
the right file.
This bug report was last modified 2 years and 350 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.