On Tue, May 10, 2022 at 12:28 PM Vitaly Zaitsev via devel
<devel@lists.fedoraproject.org> wrote:
>
> On 10/05/2022 18:00, Ben Beasley wrote:
> > Could you please elaborate on why this form is better?
>
> For building on RHEL without EPEL being enabled.
>
> > At minimum, “%if 0%{?rhel} && 0%{?rhel} == 8” is exactly equivalent to
> > “%if 0%{?rhel} == 8”.
>
> Double checks are preferable, because "%if 0%{?rhel} < X" can easily
> break things.
>
> For example, on Fedora the %{?rhel} macro is not defined, so the
> condition 0%{?rhel} < 9 will be true because 0 is less than 9.

So what? If you're checking:

      %if 0%{?rhel} == 8

There's no need for the double check. If you were looking for RHEL <
8, yeah, it could make sense

      %if 0%{?rhel} && 0%{?rhel} < 8
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to