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

Re: RFC: relaxation of debian-emacs-policy dependency requirements

On Wed, Jul 07, 2010 at 12:57:19PM +0200, Agustin Martin wrote:
> > > 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$'`

Forget about this. This will not check the same. Unles I am missing
something, what emacs-package-* checks is not that emacsen-common is
configured, but that it has been configured at least once and so,
installed-flavors has been created. Above line will check if emacsen-common
is in configured status, what is different, and may result in totally
skipped byte-compilation.

Anyway, I have problems to see what is exactly needed from (at least once)
configured emacsen-common that is not available from just unpacked
emacsen-common. Byte-compilation should work with both -no-site-file 
and --no-init-file enabled.

Imagine a package 'aaa' that contains casual lisp code and would like it to
be byte-compiled if emacsen are installed and not otherwise. If
emacs-package-* check is removed and aaa uses the standard dh_installemacsen

 # dpkg -i aaa emacsen-common

Configuring aaa -> Nothing is done.
Configuring emacsen-common -> Nothing but creating an empty
  installed-flavors is done.

 # dpkg -i emacs23

 byte-compile aaa 
 byte-compile others ...

 # dpkg -r aaa emacsen-common emacs23 (depends on emacsen-common)

 remove aaa
 remove emacs23
 remove emacsen-common

should also have no problems. I think this should work well in all
scenarios you point out in your other message explaining what the system
must support (of course in all but the gs problem).

The most I think about this the most I think the installed-flavors 
emacs-package-* check should be removed and assume that if installed-flavors
is not present it must be created with proper permissions and continue. If 
I am missing something important, please tell.


Reply to: