[Rpm-ecosystem] Rich deps syntax finalization

Pavel Odvody podvody at redhat.com
Tue Aug 25 16:12:20 UTC 2015


On Tue, 2015-08-25 at 18:01 +0200, Florian Festi wrote:
> On 08/25/2015 05:54 PM, Pavel Odvody wrote:
> >> Technically a NOT operator should not be needed. So we are basically
> >> looking for real life examples where it would be really handy or even a
> >> pain if it was missing. What would you do with a NOT operator?
> >>
> > 
> > Requires: (PkgA AND (PkgB IF NOT PkgC)
> 
> > But I'm really not sure whether it isn't just easier (correct) to handle
> > this through conflicts / virtual provide.
> 
> Well, as Requires are (logically) all connected with an AND this is
> equivalent to:
> 
> Requires: PkgA
> Requires: (PkgB IF NOT PkgC)
> 
> And as IF is equivalent to OR NOT this is equivalent to
> 
> Requires: PkgA
> Requires: (PkgB OR PkgC)
> 
This is  a great remark - Arguments are short-circuit evaluated.

> That's why I am interested in *real world* examples where we can at
> least argue that writing it in a given way is more clear and the one
> without using NOT.

> >> [2] We are talking about Boolean operators here - not if statements.
> >> Those variants are identical to the forward and backward implication
> >> which are identical to (NOT . OR .) and (. OR NOT .)
> 
> 
> Florian
> 


-- 
Pavel Odvody <podvody at redhat.com>
Software Engineer - EMEA ENG Developer Experience
5EC1 95C1 8E08 5BD9 9BBF 9241 3AFA 3A66 024F F68D
Red Hat Czech s.r.o., Purkyňova 99/71, 612 45, Brno

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.rpm.org/pipermail/rpm-ecosystem/attachments/20150825/fd09eed1/attachment.asc>


More information about the Rpm-ecosystem mailing list