#840793 emacsen-common: Making of symlinks to debian-startup.el breaks emacs-snapshot

#840793#5
Date:
2016-10-14 22:48:43 UTC
From:
To:
The problem is these lines in
/usr/lib/emacsen-common/packages/install/emacsen-common:

(cd /usr/share/${FLAVOR}/site-lisp
  ln -s ../../emacs/site-lisp/debian-startup.el .)

The use of ../.. assumes that the Emacs installation is in /usr.

There's a useful setup for installing Emacs from source but
integrating it with Debian, which I maintain:

https://github.com/rrthomas/src-emacs-on-debian

This package assumes that Emacs is installed from source in /usr/local
(as is only sensible, don't want it trampling over alternatives in
/usr/bin etc.!).

However, this causes the above code to make broken links.

The obvious fix is to make the relative path absolute (refer to
/usr/share...), but I don't know whether that would cause other
problems (I tested it, and it didn't seem to!). This fix would involve
replacing the above two lines with:

ln -s /usr/share/emacs/site-lisp/debian-startup.el /usr/share/${FLAVOR}/site-lisp/

There's no problem with the other relative symlink, just above the one
I quote, to /etc/${FLAVOR}/site-start.d, as emacs-snapshot ensures
that /etc, not /usr/local/etc, is used.

#840793#10
Date:
2026-04-20 10:29:43 UTC
From:
To:
Hello Rob,

I just took over maintainership of the *src-emacs-on-debian* repository
(https://github.com/ktetzlaff/src-emacs-on-debian) from Reuben Thomas
who created this bug report. Even though there is a workaround, I wanted
to take the opportunity to express my support for the requested
change. It is included in the attached patch.

In addition, would you consider to update section 5D of
*debian-emacs-policy* to state that symbolic links in
`/usr/share/<flavor>/site-lisp/<package-name>` should always be created
using absolute paths?

If you feel that this request is not appropriate, please just tag the
bug report as *Will not Fix*. This would allow *src-emacs-on-debian* to
update its README, removing the current reference to this bug.

Thanks,
Kai