Bug#193367: emacs-goodies-el: Can't remove package properly
On May 14, Peter S Galbraith (firstname.lastname@example.org) wrote:
> Package: emacs-goodies-el
> Version: 21.0-1
> Severity: normal
> I can't believe I never noticed this before, but it likely affects the
> majority of Elisp package. See if my reasoning is flawed...
> If I do `apt-get remove emacs-goodies-el' which is a pretty method these
> days, or if I `dpkg --remove emacs-goodies-el', the _config_ file
> stays in place. The next time I start Emacs, it loads the file. Since
> I have not added a condition in this file about `emacs-goodies-el'
> actually being installed, the elisp is evaluated anyway.
> Then can do:
> M-x apt-utils-show-package
> and get the error:
> call-interactively: Cannot open load file: apt-utils
> e.g. all my autoloads are setup, but they shouldn't.
> A quick look at my system shows that the `gnus' package checks for this,
> but few others. I know I'm guilty.
Good point. I'll add such a test to my aplus-fsf-el package. Just to make
sure we're all on the same page, is the following along the lines of what you
(let ((aplus-fsf-el-pkgdir (concat "/usr/share/"
(if (file-exists-p aplus-fsf-el-pkgdir)
(autoload 'a-mode "aplus" "Major mode for editing A+ code." t)
; other stuff that only applies if the aplus-fsf-el package is installed