Indeed, I don't need xemacs and purge it to avoid the problem.
Concerning the packages I installed, it was emacs (and not directly emacs23) and tuareg-mode.
xemacs21 is maybe also a dependency of the emacs package (or a recommended one).
I don't think it is a duplicate of bug #467446. This one seems to be about a problem
with update-alternatives while I got errors compiling tuareg-mode related .el files for xemacs21.
install/ocaml-mode: Handling install for emacsen flavor xemacs21
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/caml-compat.el...
Wrote /usr/share/xemacs21/site-lisp/ocaml-mode/caml-compat.elc
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/camldebug.el...
While compiling toplevel forms in file /usr/share/xemacs21/site-lisp/ocaml-mode/camldebug.el:
!! error (("Invalid syntax description flag: \"()1n\""))
>>Error occurred processing camldebug.el:
Invalid syntax description flag: "()1n"
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/caml.el...
Wrote /usr/share/xemacs21/site-lisp/ocaml-mode/caml.elc
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/caml-font.el...
Wrote /usr/share/xemacs21/site-lisp/ocaml-mode/caml-font.elc
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/caml-help.el...
Wrote /usr/share/xemacs21/site-lisp/ocaml-mode/caml-help.elc
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/caml-hilit.el...
Wrote /usr/share/xemacs21/site-lisp/ocaml-mode/caml-hilit.elc
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/caml-types.el...
Wrote /usr/share/xemacs21/site-lisp/ocaml-mode/caml-types.elc
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/caml-xemacs.el...
Wrote /usr/share/xemacs21/site-lisp/ocaml-mode/caml-xemacs.elc
Compiling /usr/share/xemacs21/site-lisp/ocaml-mode/inf-caml.el...
Wrote /usr/share/xemacs21/site-lisp/ocaml-mode/inf-caml.elc
Done
emacs-install: /usr/lib/emacsen-common/packages/install/ocaml-mode xemacs21 emacs23 failed at /usr/lib/emacsen-common/emacs-install line 28, <TSORT> line 4.
dpkg: error processing xemacs21-mule (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
Indeed, I don't need xemacs and purge it to avoid the problem.
Concerning the packages I installed, it was emacs (and not directly emacs23) and tuareg-mode.
xemacs21 is maybe also a dependency of the emacs package (or a recommended one).
I don't think it is a duplicate of bug #467446. This one seems to be about a problem
with update-alternatives while I got errors compiling tuareg-mode related .el files for xemacs21.
install/ ocaml-mode: Handling install for emacsen flavor xemacs21 xemacs21/ site-lisp/ ocaml-mode/ caml-compat. el... xemacs21/ site-lisp/ ocaml-mode/ caml-compat. elc xemacs21/ site-lisp/ ocaml-mode/ camldebug. el... xemacs21/ site-lisp/ ocaml-mode/ camldebug. el:
Compiling /usr/share/
Wrote /usr/share/
Compiling /usr/share/
While compiling toplevel forms in file /usr/share/
!! error (("Invalid syntax description flag: \"()1n\""))
>>Error occurred processing camldebug.el:
Invalid syntax description flag: "()1n"
Compiling /usr/share/ xemacs21/ site-lisp/ ocaml-mode/ caml.el. .. xemacs21/ site-lisp/ ocaml-mode/ caml.elc xemacs21/ site-lisp/ ocaml-mode/ caml-font. el... xemacs21/ site-lisp/ ocaml-mode/ caml-font. elc xemacs21/ site-lisp/ ocaml-mode/ caml-help. el... xemacs21/ site-lisp/ ocaml-mode/ caml-help. elc xemacs21/ site-lisp/ ocaml-mode/ caml-hilit. el... xemacs21/ site-lisp/ ocaml-mode/ caml-hilit. elc xemacs21/ site-lisp/ ocaml-mode/ caml-types. el... xemacs21/ site-lisp/ ocaml-mode/ caml-types. elc xemacs21/ site-lisp/ ocaml-mode/ caml-xemacs. el... xemacs21/ site-lisp/ ocaml-mode/ caml-xemacs. elc xemacs21/ site-lisp/ ocaml-mode/ inf-caml. el... xemacs21/ site-lisp/ ocaml-mode/ inf-caml. elc emacsen- common/ packages/ install/ ocaml-mode xemacs21 emacs23 failed at /usr/lib/ emacsen- common/ emacs-install line 28, <TSORT> line 4.
Wrote /usr/share/
Compiling /usr/share/
Wrote /usr/share/
Compiling /usr/share/
Wrote /usr/share/
Compiling /usr/share/
Wrote /usr/share/
Compiling /usr/share/
Wrote /usr/share/
Compiling /usr/share/
Wrote /usr/share/
Compiling /usr/share/
Wrote /usr/share/
Done
emacs-install: /usr/lib/
dpkg: error processing xemacs21-mule (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)