On Tue, Feb 22, 2011 at 02:39:19PM -0600, Jonathan Nieder wrote:
> retitle 614578 git: postinst fails if emacsen-common is unpacked but not 
> configured
> severity 614578 serious
> quit
> 
> Hi,
> 
> Christoph Egger wrote:
> 
> > Setting up git (1:1.7.4.1-1) ...
> > ERROR: emacsen-common being used before being configured.
> > ERROR: This is likely a bug in the git package, which needs to
> > ERROR: add one of the appropriate dependencies.
> > ERROR: See /usr/share/doc/emacsen-common/debian-emacs-policy.gz
> > ERROR: for details.
> 
> Yikes.
> 
> git does not depend on emacsen, but its postinst contains
> 
>  if test -x /usr/lib/emacsen-common/emacs-package-install; then
>    /usr/lib/emacsen-common/emacs-package-install git
>  fi
> 
> the theory being, if you have emacs installed, you'd presumably want
> to have these modules byte-compiled.
> 
> It sounds like that "text -x" condition is too weak.  Does the emacsen
> policy provide a way to check whether emacsen-common is configured
> (i.e., ready to be used)?  

A temporary hack is to also check /var/lib/emacsen-common/installed-flavors
presence (see #268466),

if [ "$1" = "configure" ] && \
   [ -x /usr/lib/emacsen-common/emacs-package-install ] && \
   [ -e /var/lib/emacsen-common/installed-flavors ]
 then
        /usr/lib/emacsen-common/emacs-package-install #PACKAGE#
 fi

Note that this is a hack and was not originally designed to check that 
emacsen-common is configured, but should work with current setup. This 
will surely need changes once Rob redesign is done and in effect, but system
may need changes anyway.

Also note that this means you must add that code explicitely and do not rely
in dh_installemacsen.

> Otherwise, I suppose the .el files will
> have to move to a separate git-emacs package (which would depend on
> emacsen-common).

If you only add few lisp files I would temporarily use above hack and wait
for Rob re-design to decide what it allows and what to do. I personally
dislike packages with little lisp needing to create a new package just for
that lisp.

Regards,

-- 
Agustin



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to