[Fedora-packaging] Conditional comparision doesn't work
Michael Schwendt
mschwendt at gmail.com
Sat Apr 9 17:14:57 UTC 2011
On Sat, 09 Apr 2011 19:01:20 +0200, Christoph wrote:
> I have a spec with
>
> %global panelversion 4.8.3
> or
> %global panelversion %(rpm -q --qf='%{VERSION}' xfce4-panel)
>
> As expected this returns "4.8.3" and
>
> Requires: xfce4-panel >= %{panelversion}
>
> works fine. However
>
> %if 0%{?panelversion} >= 4.7
> %patch3 -p1
> %endif
>
> does not but returns:
>
> Error: xfce4-cellmodem-plugin.spec:54: parseExpressionBoolean returns -1
>
> Do I miss something obvious?
Neither 04.8.3 nor 4.7 can be converted into an integer as expected by
the >= comparison. For values like that, you would need to use string
comparison.
More information about the packaging
mailing list