Hi! Alex Kost <[email protected]> skribis:
> To recap: we use "gnu/packages/patches/emacs-source-date-epoch.patch" to > modify 'autoload-insert-section-header' function, and it should work, > but it doesn't. IIUC this happens because "autoload.elc" file was > compiled using the unpatched "autoload.el", but first things first. Try > the following recipe in Emacs (installed with Guix): > > 1. M-: (setenv "SOURCE_DATE_EPOCH" "1") > > 2. Generate autoloads for any file with autoload cookies. If you don't > have such a file at hand, make "/tmp/f1.el" file with this single > line: > > ;;;###autoload(defun f1 nil) > > Then: "M-x update-file-autoloads </tmp/f1.el> </tmp/auto1.el>" > > Now open "/tmp/auto1.el" and you'll see a "bad" timestamp like this one: > (22323 17532 313464 85000). > > But! If you reevaluate 'autoload-insert-section-header' and try again > the timestamp will be "good": > > 3. M-x find-function autoload-insert-section-header > > 4. Reevaluate it: C-M-x > > 5. M-x update-file-autoloads </tmp/f1.el> </tmp/auto2.el> > > Now look at "/tmp/auto2.el": it contains (0 1 0 0) timestamp as > expected. Weird! > I looked at the compiled "autoload.elc" file and if I understood it > correctly, it was compiled using the unpatched version of "autoload.el" > (because there is no mention of SOURCE_DATE_EPOCH there). Indeed. > But I don't understand how it could happen since patching is performed > before building. Any ideas? I think I have one: --8<---------------cut here---------------start------------->8--- $ git describe v0.10.0-798-g8a7680a $ tar tvf $(./pre-inst-env guix build -S emacs) |grep 'autoload\.el' -rw-r--r-- root/root 37292 1970-01-01 01:00 emacs-24.5/lisp/emacs-lisp/autoload.el -rw-r--r-- root/root 37127 1970-01-01 01:00 emacs-24.5/lisp/emacs-lisp/autoload.el.orig -rw-r--r-- root/root 22624 1970-01-01 01:00 emacs-24.5/lisp/emacs-lisp/autoload.elc --8<---------------cut here---------------end--------------->8--- Upstream’s tarball already includes those three files. Ideally, we should remove all the .elc files and rebuild them, but maybe there are bootstrapping issues. Would you be willing to give it a try? :-) Thanks, Ludo’.
