[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#193439: emacsen-common: debian-emacs-policy and package setup in conffile



Package: emacsen-common
Version: 1.4.15
Severity: normal

Hi,

debian-emacs-policy should instruct package maintainers who add
autoloads and other setups in an /etc/emacs/site-start.d/ file to make
that conditional upon the package actually being installed.

If the package is removed and not purged, the etc/emacs/site-start.d/
conffile will still be installed and invoked at Emacs startup.  It
should not setup autoloads for commands that don't exists, nor should
should it add a non-existing directory to the load-path.

It's likely that _most_ existing elisp packages have this problem!

Here's what I've decide to do with `emacs-goodies-el' :

(if (not (file-exists-p "/usr/share/emacs/site-lisp/emacs-goodies-el"))
    (message
     "Package emacs-goodies-el is removed but not purged.  Setup not done.")
  (debian-pkg-add-load-path-item
   (concat
    "/usr/share/" (symbol-name flavor) "/site-lisp/emacs-goodies-el"))
  (require 'emacs-goodies-el))

I have moved the bulk of setups in a separate file `emacs-goodies-el.el'
that is not under /etc, but that's only because it contains a _lot_ of
code.

Peter



Reply to: