On Tue, Jul 06, 2010 at 10:54:33PM -0500, Rob Browning wrote: > Agustin Martin <agmar...@debian.org> writes: > > > On Tue, Jul 06, 2010 at 11:51:06AM +0100, Ian Jackson wrote: > > >> Why should a package which happens to also ship some elisp need to > >> depend on any Emacs package at all ? What will go wrong if the > >> package is installed without any Emacs ? > > > > Agreed. > > > > lisp stuff in a package whose main use is not Emacs should be used if > > an emacsen package is installed and ignored otherwise. There is nothing > > wrong > > with that. Even if /var/lib/emacsen-common/installed-flavors was not > > originally designed for that, seems a good way to know if emacsen-common is > > configured, so a prerm snippet like > > > > if [ -x /usr/lib/emacsen-common/emacs-package-remove ] && > > [ -e /var/lib/emacsen-common/installed-flavors ]; then > > /usr/lib/emacsen-common/emacs-package-remove #PACKAGE# > > fi > > I'd rather not handle it this way. If we do relax the policy > requirement, I'd rather abstract this a bit more, so that add-on > packages don't directly depend on a detail of the current > implementation, and commit emacsen-common to the maintenance of > installed-flavors indefinitely.
We can alway use dpkg for this, just that using an ad-hoc flag set by emacsen-common is faster. Ian surely knows better ways for checking for emacsen-common status, but a prerm snippet like EC_READY=`dpkg --status emacsen-common 2> /dev/null | grep '^Status: .* installed$'` if [ -x /usr/lib/emacsen-common/emacs-package-remove ] && [ "$EC_READY" ]; then /usr/lib/emacsen-common/emacs-package-remove #PACKAGE# fi should work. Actually if $EC_READY above is set, '/usr/lib/emacsen-common/emacs-package-remove' should already be available and executable, otherwise is a bug, so just using EC_READY=`dpkg --status emacsen-common 2> /dev/null | grep '^Status: .* installed$'` if [ "$EC_READY" ]; then /usr/lib/emacsen-common/emacs-package-remove #PACKAGE# fi may be enough. -- Agustin -- To UNSUBSCRIBE, email to debian-emacsen-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20100707105719.ga21...@agmartin.aq.upm.es