emacsen-common: Please symlink to the .el when byte compiling for each emacsen
Michael Olson <firstname.lastname@example.org> writes:
> I've attached a patch to debian-emacs-policy that helps to fix this
> bug. I mentioned this on the debian-emacsen list, and no one had
> anything to say about it after a couple of weeks, so it seems to be
> --- debian-emacs-policy 2006-11-20 22:45:46.000000000 -0500
> +++ debian-emacs-policy 2006-11-20 22:52:09.000000000 -0500
> @@ -236,6 +236,17 @@
> file. emacsen-common will make sure that the install/remove
> scripts are ordered to respect inter-add-on package dependencies.
> + E) If an Emacs add-on package compiles any of its Emacs Lisp
> + sources, it should install the compiled bytecode files to
> + /usr/share/<flavour>/site-lisp/<package-name>.
I've finally added something to this effect for an upcoming release
(probably a 1.4.23 release unless I get the major 2.0.0 overhaul out
fairly quickly -- that's more or less working now):
E) If an add-on package compiles any of its Emacs Lisp sources (which
must be compiled to a subdirectory of
/usr/share/<flavor>/site-lisp/<package-name> -- see section 4
above) it must also create a symlink in the same directory as the
compiled output that points to the corresponding source file.
For example, if add-on package foo produces
/usr/share/emacs23/site-lisp/foo/bar.elc, then it must also create
a symlink /usr/share/emacs23/site-lisp/foo/bar.el pointing to
the corresponding source file. This ensures that Emacs will be
able to locate the source code for the add-on package when using
M-x find-function, etc.
> @@ -277,6 +288,14 @@
> (fboundp 'debian-pkg-add-load-path-item) before calling this
> function, or add a dependency on emacsen-common (>= 1.4.14).
> + If an Emacs add-on package compiles its Emacs Lisp sources, it
> + should only add /usr/share/<flavour>/site-lisp/<package-name> (and
> + its subdirectories of compiled code, if applicable) to the load
> + path, rather than /usr/share/<emacs>/site-lisp/<package-name>. If
> + a subdirectory of /usr/share/<emacs>/site-lisp/<package-name>
> + contains uncompiled Emacs Lisp code, it may also be added to the
> + load path.
> 10) Usage of autoload instead of load in the site-start.d files.
> It's been suggested, and is probably a good idea that maintainers
I haven't added this yet because I think existing policy requirements
should already have the intended effect. Unless I'm forgetting
something, add-on packages are already required to stick to the <flavor>
directories, and the <flavor> directories are required to come first in
the load path for each emacsen (which is enforced for add-ons via
debian-pkg-add-load-path-item -- see section 9).
But please let me know if I've overlooked something.
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4