Bug#1052164: xemacs21: should not try to byte-compile the files from /usr/share/emacs/site-lisp

2023-09-18 Thread Vincent Lefevre
On 2023-09-18 16:20:00 +0200, Vincent Lefevre wrote:
> Files in /usr/share/emacs/site-lisp are not necessarily compatible
> with XEmacs. So XEmacs should not try to byte-compile them, or
> at least, package installation should no fail because of that.
> 
> For instance, mmm-mode is not compatible with xemacs21, so that
> its maintainer had to add "Conflicts: xemacs21". This is not
> satisfactory: a multi-user machine may have the packages emacs-gtk
> and xemacs21 installed because there are users who use GNU Emacs
> and other users who use XEmacs. In such a case, with the current
> situation, it is not possible to install mmm-mode for GNU Emacs
> users because of the conflict. This is really bad.
[...]

I've looked at the mmm-mode source and submitted a new bug with
a patch to avoid the issue on the mmm-mode side by disabling the
xemacs flavor (as other packages do that):

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052166

I suppose that this is sufficient, but I don't know the Emacs
handling in Debian...

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#1052164: xemacs21: should not try to byte-compile the files from /usr/share/emacs/site-lisp

2023-09-18 Thread Vincent Lefevre
Package: xemacs21
Version: 21.4.24-12
Severity: important

Files in /usr/share/emacs/site-lisp are not necessarily compatible
with XEmacs. So XEmacs should not try to byte-compile them, or
at least, package installation should no fail because of that.

For instance, mmm-mode is not compatible with xemacs21, so that
its maintainer had to add "Conflicts: xemacs21". This is not
satisfactory: a multi-user machine may have the packages emacs-gtk
and xemacs21 installed because there are users who use GNU Emacs
and other users who use XEmacs. In such a case, with the current
situation, it is not possible to install mmm-mode for GNU Emacs
users because of the conflict. This is really bad.

FYI, here are the errors one obtains when installing mmm-mode
if "Conflicts: xemacs21" is removed and xemacs21 is installed:

[...]
Setting up mmm-mode (0.5.9-2) ...
Install emacsen-common for emacs
emacsen-common: Handling install of emacsen flavor emacs
Install emacsen-common for xemacs21
emacsen-common: Handling install of emacsen flavor xemacs21
Loading /usr/share/emacsen-common/debian-startup...
Loading 00debian...
Compiling /usr/share/xemacs21/site-lisp/debian-startup.el...
Wrote /usr/share/xemacs21/site-lisp/debian-startup.elc
Done
Install mmm-mode for emacs
install/mmm-mode: Handling install of emacsen flavor emacs
install/mmm-mode: byte-compiling for emacs
Install mmm-mode for xemacs21
install/mmm-mode: Handling install of emacsen flavor xemacs21
install/mmm-mode: byte-compiling for xemacs21
Compiling /usr/share/xemacs21/site-lisp/mmm-mode/cl-lib.el...
>>Error occurred processing cl-lib.el: Opening input file: No such file or 
>>directory, /usr/share/xemacs21/site-lisp/mmm-mode/cl-lib.el

Compiling /usr/share/xemacs21/site-lisp/mmm-mode/mmm-auto.el...
While compiling toplevel forms in file 
/usr/share/xemacs21/site-lisp/mmm-mode/mmm-auto.el:
  !! File error (("Cannot open load file" "cl-lib"))
>>Error occurred processing mmm-auto.el: Cannot open load file: cl-lib
[...]
ERROR: install script from mmm-mode package failed
dpkg: error processing package mmm-mode (--configure):
 installed mmm-mode package post-installation script subprocess returned error 
exit status 1

If a cl-lib file is provided in order to attempt to support xemacs21,
there are other errors like

Wrong number of arguments: (lambda (oldfun newfun)  
(byte-code "..." [newfun oldfun define-function make-obsolete] 3)), 4   

because for some functions, the number of arguments for xemacs21
is different from the one for the latest GNU Emacs versions.

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
merged-usr: no
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-1-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=POSIX, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages xemacs21 depends on:
ii  xemacs21-mule  21.4.24-12

xemacs21 recommends no packages.

xemacs21 suggests no packages.

-- no debconf information

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)