Bug#1056381: bbdb3 compilation/installation fails when notmuch is not installed

2023-11-22 Thread David Bremner
Derek Upham  writes:

>
> I have emacs-snapshot and bbdb3 installed.  Updating emacs-snapshot
> attempts to byte-compile the various Emacs Lisp packages, including
> bbdb3.  The bbdb3 byte-compilation fails for bbdb-notmuch.el.

Can you duplicate the problem without emacs-snapshot? I don't know
offhand why it should depend on emacs-snapshot, but formally
emacs-snapshot isn't a package in Debian, so not supported. Looking at
the hand-rolled install script [1], it looks like you are correct, there is
special code to detect vm and mu4e.


[1]: /usr/lib/emacsen-common/packages/install/bbdb3



Bug#1056381: bbdb3 compilation/installation fails when notmuch is not installed

2023-11-21 Thread Derek Upham
Package: bbdb3
Version: 3.2.2d-1
Severity: normal
Tags: upstream

Dear Maintainer,

I have emacs-snapshot and bbdb3 installed.  Updating emacs-snapshot
attempts to byte-compile the various Emacs Lisp packages, including
bbdb3.  The bbdb3 byte-compilation fails for bbdb-notmuch.el.

  Install bbdb3 for emacs-snapshot
  install/bbdb3: Handling install for emacsen flavor emacs-snapshot
  vm seems uninstalled in emacs-snapshot, skipping bbdb-vm
  mu4e seems uninstalled in emacs-snapshot, skipping bbdb-mu4e
  invoking: emacs-snapshot --no-init-file --batch --load path.el
--funcall batch-byte-compile bbdb-anniv.el bbdb-com.el
bbdb-gnus-aux.el bbdb-gnus.el bbdb-ispell.el bbdb-loaddefs.el
bbdb-message.el bbdb-mhe.el bbdb-migrate.el bbdb-mua.el
bbdb-notmuch.el bbdb-pgp.el bbdb-rmail.el bbdb-sc.el
bbdb-snarf.el bbdb-tex.el bbdb-vm-aux.el bbdb-wl.el bbdb.el
  
  In toplevel form:
  bbdb-loaddefs.el:1:1: Warning: file has no ‘lexical-binding’ directive on its 
first line
  
  In toplevel form:
  bbdb-notmuch.el:27:2: Error: Cannot open load file: No such file or 
directory, notmuch-show
  
  In toplevel form:
  bbdb-vm-aux.el:233:10: Warning: in defcustom for 
‘bbdb/vm-auto-add-label-list’: ‘list’ without arguments
  bbdb-vm-aux.el:241:25: Warning: in defcustom for 
‘bbdb/vm-auto-add-label-field’: ‘list’ without arguments
  ERROR: install script from bbdb3 package failed

The failing form is visible in the upstream sources
(https://git.savannah.nongnu.org/cgit/bbdb.git/tree/lisp/bbdb-notmuch.el#n27):

  (require 'notmuch-show)

The log messages suggest that the bbdb3 installer has guards to
avoid compiling the vm and mu4e integration files, if the system
does not have those libraries.  The upstream code also has its own
compilation guards directly in the source code for the corresponding
files:

- https://git.savannah.nongnu.org/cgit/bbdb.git/tree/lisp/bbdb-mu4e.el#n27
- https://git.savannah.nongnu.org/cgit/bbdb.git/tree/lisp/bbdb-vm.el#n30

It looks like we need either or both mechanisms for bbdb-notmuch.el.

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-20-amd64 (SMP w/24 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

bbdb3 depends on no packages.

Versions of packages bbdb3 recommends:
ii  emacs  1:29.1+1-5
ii  emacs-gtk [emacs]  1:29.1+1-5

bbdb3 suggests no packages.

-- no debconf information