Re: what is wrong with this conditional scriplet on rpm.spec

2021-11-03 Thread Sérgio Basto
On Wed, 2021-11-03 at 14:26 -0400, Ben Beasley wrote: > I don’t know where to find documentation for operator precedence in > RPM > conditional expressions, but it looks like “!” binds more tightly > than > “>=”, so > >  > %if ! 0%{?rhel} >= 8 > > is grouped as > >  > %if (! 0%{?rhel}) >= 8 >

Re: what is wrong with this conditional scriplet on rpm.spec

2021-11-03 Thread Ben Beasley
I don’t know where to find documentation for operator precedence in RPM conditional expressions, but it looks like “!” binds more tightly than “>=”, so > %if ! 0%{?rhel} >= 8 is grouped as > %if (! 0%{?rhel}) >= 8 which becomes, on Fedora: > %if (! 00) >= 8 > %if 1 >= 8 and therefore eval

what is wrong with this conditional scriplet on rpm.spec

2021-11-03 Thread Sérgio Basto
Hi, I just notice build in mock or koji this scriptlet [1] on a build for Fedora gives me "is rhel 8 or 9" , what I'm missing ? Thank you [1] %if ! 0%{?rhel} >= 8 echo "is not rhel >= 8" %else echo "is rhel 8 or 9" %endif -- Sérgio M. B. ___ dev