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
>
> which becomes, on Fedora:
>
> > %if (! 00) >= 8
>
> > %if 1 >= 8
>
> and therefore evaluates false.
>
> Writing
>
> > %if ! (0%{?rhel} >= 8)
>
> seems to do what you want, as would:
yes is exactly what I'm missing
Thank you
> > %if 0%{?rhel} < 8
>
the logic doesn't fail , but it is trick because includes {?fedora}
> On 11/3/21 14:09, Sérgio Basto wrote:
> > 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
> >
> _______________________________________________
> devel mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines:
> https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/[email protected]
> Do not reply to spam on the list, report it:
> https://pagure.io/fedora-infrastructure
--
Sérgio M. B.
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure