Advice requested with tricky dependencies in records.deb
My package "records" is a nice emacsy way to handle notes and
It depends on emacsen, perl5, and mailcrypt. Except that
XEmacs bundles mailcrypt, so it depends on
perl5 AND (
((emacs20 OR emacs21 OR mule2) AND mailcrypt)
OR (xemacs21 OR xemacs21-gtk)
Eww. And it was worse before I noticed most XEmacsen provide
xemacs21, and GNU Emacsen provide emacsNN or mule2. To ease
parsing, read that as
perl5 AND (
($GNU_Emacs AND mailcrypt)
This is just something the dependency system can't express.
The current package approximates that with
Depends: emacs20 | emacsen, mailcrypt|xemacs20|xemacs21, perl5
which fails in one case: user has GNU Emacs _and_ XEmacs
installed, but mailcrypt is not installed. Package
installation is aborted when it tries to compile the .el for
GNU Emacs. This is reported as grave bug #84789.
Suggestions so far:
1. Make XEmacs provide mailcrypt
Won't work, XEmacs has mailcrypt in
/usr/share/xemacs21/packages/lisp/mailcrypt - it is
meant for XEmacs only. And the lisp might even be
modified to be specific to XEmacs. GNU Emacs can't
2. Add install-time logic that detects the failing case,
outputs better information, and fails.
Doesn't really solve the problem..
3. Split the package, records-gnuemacs and records-xemacs
records-gnuemacs would have
Depends: emacs20 | emacs21 | mule2, mailcrypt, perl5
records-xemacs would have
Depends: xemacs21 | xemacs21-gtk, perl5
This is doable, but a bit ugly. And it means I have
to enumerate all emacsen -- thankfully not individual
package names, but only on a higher level.
Now, I need your $0.02:
1. Is there any other solution?
2. If I split the package, should I do
Depends: emacs20 | emacs21 | mule2, mailcrypt, perl5, records-common
Depends: xemacs21 | xemacs21-gtk, perl5, records-common
where records-common has all the real stuff, and the two
specific packages are just to work around the problems? Or
should I just include the files in both of the packages? If I
use a -common, I need to careful not to try to compile the
.el's for any other emacs than what have records-foo packages