[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Advice requested with tricky dependencies in records.deb

On Sun, Oct 28, 2001 at 08:53:58PM +0200, Tommi Virtanen <tv@debian.org> was heard to say:
> 	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) 
>                 OR $XEmacs
>         )
> 	This is just something the dependency system can't express. 

  *puts theoretical computer science hat on*

  Actually, the dependency system can express it, since it's just a
boolean expression.  You just have to convert it to product-of-sums.

  *takes theoretical computer science hat off*

  (mind, the product-of-sums might be infeasibly complicated >=) )

> 	The current package approximates that with
> Depends: emacs20 | emacsen, mailcrypt|xemacs20|xemacs21, perl5

  Try this:

Depends: perl5, emacs20 | emacs21 | mule2 | xemacs20 | xemacs21 | xemacs21-gtk, \
	xemacs20 | xemacs21 | xemacs21-gtk | mailcrypt

  If that's wrong, my boolean algebra is :)  (either that, or I
misunderstood what you're trying to do)

  (what I did was transform "perl5 AND ( (Emacs AND mailcrypt) OR Xemacs)"
   to "perl5 AND ((Emacs OR Xemacs) AND (mailcrypt OR Xemacs))" --
   logical OR distributes over AND and vice versa)


/-------------------- Daniel Burrows <dburrows@debian.org> -------------------\
|                   "Truly, you have a dizzying intellect."                   |
|                     -- "The Princess Bride"                                 |
\----------------- The Turtle Moves! -- http://www.lspace.org ----------------/

Reply to: