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

Re: dependency mess: i'd like boolean operators



On Fri, Feb 09, 2001 at 12:06:14PM +0100, Domenico Andreoli wrote:
> > Depends: curl (= 7.4.2-2) | curl (>= 7.5-1),
> >          libcurl0-ssl (= 7.4.2-2) | curl (>= 7.5-1),
> >          curl (= 7.4.2-2) | libcurl1-ssl (>= 7.5-1),
> >          libcurl0-ssl (= 7.4.2-2) | libcurl1-ssl (>= 7.5-1)
> > 
> this is really interesting, so let me understand more:
> 
> 1)   the first clause can be simplified as you said below, ok.
> 
> 2&3) the second... should be "|" read as XOR (exclusive or)?
>      there is no meaning in the order of the operands of "|", right?
>      if what i said is correct then second and third cluses are ok.
> 
> 4)   the fourth clause has sense only if "|" has a XOR meaning.

No, | is the usual alternatives syntax for Depends lines, it's
basically an OR.  I derived it this way:
    (p & q) | (r & s)
    is
    ((p & q) | r)  & ((p & q) | s)
    is
    (p | r) & (q | r) & (p | s) & (q | s)

It's three applications of the distribution rule for & and |.
The end result looks complicated but has the same meaning as the
original, and it can be expressed in dpkg's Depends syntax.

Richard Braakman



Reply to: