billb wrote:The xulrunner rpm built OK but I had to modify the spec and force it to apply some patches.
Wherever this appears I get a syntax error:
- Code: Select all
%if !(0%{?rhel} > 5)
If I remove the parenthesis, the syntax error goes away:
- Code: Select all
%if ! 0%{?rhel} > 5
But the condition isn't met as I think it should be -- we've set rhel to = 5, and since I think the above statement says if rhel is NOT > 5, the following instructions should be applied. Err.. right? Having trouble finding documentation on the use of ! in control syntax for spec files.
Hi billb,
Thanks for looking at this. It seems like the PowerPC version of YDL sure doesn't like those parenthesis.
I'll have to check the logic in YDL for CUDA.
Anyway - here's the logic as I understand it.
First - we define rhel as 5
Then, we execute this
- Code: Select all
%if !(0%{?rhel} > 5)
(Logic reference here:
http://fedoraproject.org/wiki/How_to_cr ... PM_package )
So - working from the inside, the 0%{?rhel} evaluates as 5.
Logic notes: The ? causes the macro to evaluate to blank if %rhel is undefined. [The 0% would then cause] the end result to be the 0 (which is a number and thus fine), while not interfering with the result if there is actually a value for %rhel.
So - for our case, this is still 5.
Next we look at the logic 5 > 5 inside the parenthesis. This isn't true, so this returns a false.
Next, we use the ! character - which means NOT. So not false evaluates to true.
So - overall - the if expression with rhel defined as 5 should execute. Which is a long way of saying "Yes" to your question above.
NOTE: what this statement really does is: if the build is
not RHEL 6, execute the if expression. This is different than if the build is RHEL 5, execute the expression.
Seems convoluted, doesn't it?
Cheers,
Paul