On Tue, Jun 12, 2012 at 10:22:10AM +0200, Andreas Beckmann wrote:
> Package: emacsen-common
> Version: 2.0.3
> Severity: serious
> 
> Hi, 
> 
> an upgrade to current wheezy got stuck with emacsen-common:
> 
> # dpkg --configure --pending
> Setting up emacsen-common (2.0.3) ...
> Install emacsen-common for emacs23
> emacsen-common: Handling install of emacsen flavor emacs23
> Warning: Lisp directory `/usr/local/share/emacs/23.4/site-lisp' does not 
> exist.
> Wrote /etc/emacs23/site-start.d/00debian-vars.elc
> Wrote /usr/share/emacs23/site-lisp/debian-startup.elc
> Install emacsen-common for xemacs21
> emacsen-common: Handling install of emacsen flavor xemacs21
> 
> WARNING:
> Couldn't find obvious defaults for:
> data-directory
> mule-lisp-directory
> lisp-directory
> Perhaps some directories don't exist, or the XEmacs executable,
> /usr/bin/xemacs21
> is in a strange place?Loading /usr/share/emacs/site-lisp/debian-startup...
> Loading 00debian...
> Error while loading 00debian: Symbol's function definition is void: loop
> Loading 00debian-vars...
> Loading 50a2ps...
> Loading 50autoconf...
> Error while loading 50autoconf: No /usr/local/ prefixed paths in load-path
> Loading 50cmake...
> Loading 50cmake-data...
> Loading 50dictionaries-common...
> Error while loading 50dictionaries-common: No /usr/local/ prefixed paths in 
> load-path
> Loading 50emacs-goodies-el...
> Package emacs-goodies-el not fully installed.  Skipping setup.
> Loading 50lilypond-data...
> Loading 50psvn...
> Symbol's function definition is void: batch-byte-compile
> xemacs exiting
> .
> ERROR: install script from emacsen-common package failed
> dpkg: error processing emacsen-common (--configure):
>  subprocess installed post-installation script returned error exit status 1
> Setting up dictionaries-common (1.12.7) ...
> Install dictionaries-common for emacs23
> install/dictionaries-common: Already byte-compiled for emacs23. Skipping ...
> Install dictionaries-common for xemacs21
> install/dictionaries-common: Byte-compiling for emacsen flavour xemacs21
> 
> WARNING:
> Couldn't find obvious defaults for:
> data-directory
> mule-lisp-directory
> lisp-directory
> Perhaps some directories don't exist, or the XEmacs executable,
> /usr/bin/xemacs21
> is in a strange place?Symbol's function definition is void: batch-byte-compile
> xemacs exiting
> .
> ERROR: install script from dictionaries-common package failed
> dpkg: error processing dictionaries-common (--configure):
>  subprocess installed post-installation script returned error exit status 1
> 
> 
> As that's an experimental system (running testing/sid mix since
> testing=lenny) and noone needs emacs there, I'm leaving it broken
> for now and can provide additional information if needed.

I'd say this seems something wrong in the xemacs21 side during xemacs21
upgrade. As a matter of fact I have found 

http://bugs.debian.org/619367 [xemacs21: installing elisp packages fails:
Symbol's function definition is void: batch-byte-compile]

which has some common elements,

Setting up ocaml-mode (3.11.2-4) ...
install/ocaml-mode: Handling install for emacsen flavor xemacs21

WARNING:
Couldn't find obvious defaults for:
data-directory
mule-lisp-directory
lisp-directory
Perhaps some directories don't exist, or the XEmacs executable,
/usr/bin/xemacs21
is in a strange place?Symbol's function definition is void: batch-byte-compile
xemacs exiting

Note that I could not reproduce this in a system that is upgraded frequently.
May be this is a problem with upgrades from a particular version to a much
more recent version.

Apart from this, this problem looks triggered during install by the
persistence of http://bugs.debian.org/132355 [emacsen-common: Byte-compiling
too verbose]. Not loading site files during byte-compile may work around
this in the install phase. Do not know if there is any additional problem.

As pointed out in #132355, using single dashed -no-site-file should work for
both XEmacs and (although undocumented) FSF Emacs.

If maintainer wants to be in the safe side and use only documented features
I expect something like attached patch to work for emacsen-common.

Regards,

-- 
Agustin
diff --git a/emacsen-common.install b/emacsen-common.install
index de2e7a7..b8046a9 100755
--- a/emacsen-common.install
+++ b/emacsen-common.install
@@ -3,8 +3,27 @@
 set -e
 
 FLAVOR=$1
+package=emacsen-common
+
+case "$FLAVOR" in
+    emacs)
+        # Dummy emacs flavor. Do nothing and exit
+        exit 0
+        ;;
+    xemacs*)
+        no_site_file="-no-site-file"
+        ;;
+    emacs*)
+        no_site_file="--no-site-file"
+        ;;
+    *)
+        echo install/${package}: Ignoring emacsen flavor [${FLAVOR}]
+        exit 0
+        ;;
+esac
+
 # Make sure these options are appropriate for the given package.
-compile_options="--no-init-file --no-site-file -batch -f batch-byte-compile"
+compile_options="--no-init-file $no_site_file -batch -f batch-byte-compile"
 
 echo emacsen-common: Handling install of emacsen flavor ${FLAVOR}
 

Reply via email to