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

Re: Action requested: check dist tags and conditionals



Bill Nottingham wrote:
> %if 0%{?fedora} < 10
> %endif

While we are at it: Please make sure you always use 0%{?fedora},
not "%{?fedora}". The latter will do string comparisons and do the wrong
thing when comparing "9" with "10" or "11". We already had a broken
dependency in F9 updates because of that.

So DO NOT DO THIS:
%if "%{?fedora}" < "11" <-- THIS WILL NOT WORK FOR F9!
do this instead:
%if 0%{?fedora} < 11

Also DO NOT DO THIS:
%if "%{?fedora}" > "9" <-- THIS WILL NOT WORK FOR ABOUT 40 MORE YEARS (*)!
do this instead:
%if 0%{?fedora} > 9

(*) assuming Fedora still exists by then ;-) and it'll break again with
Fedora 100...

Of course, this issue will be less pressing with F9 going EOL, but it's good
to remind people of this. It'll also become an issue for %{?rhel} when
we'll reach RHEL 10, which will happen in more or less 8 years if RHEL
continues at its current pace.

        Kevin Kofler


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