<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    07.09.2011 18:59, TASAKA Mamoru wrote:
    <blockquote cite="mid:4E6786ED.2040008@fedoraproject.org"
      type="cite"><br>
      If you still see some issue, please write in detail what you see
      (and post
      <br>
      the spec file you are currently using).
      <br>
      <br>
    </blockquote>
    Yes, apparently I still have it.<br>
    The long time awhile I have there condition:<br>
    %if %( php -r "echo (version_compare(PHP_VERSION, '5.3.0', '&gt;=')
    ? 1 : 0);" )<br>
    today it produce parse error.<br>
    <br>
    Now I change it on:<br>
    %if %( php -r "echo (version_compare(PHP_VERSION, '5.3.0', '&gt;=')
    ? 1 : 0);" &amp;&gt;/dev/null || echo 0 )<br>
    but on make srpm got error:<br>
    error:
    /home/pasha/SOFT/git/php-pecl-runkit/master/php-pecl-runkit.spec:74:
    parseExpressionBoolean returns -1<br>
    error: query of specfile
    /home/pasha/SOFT/git/php-pecl-runkit/master/php-pecl-runkit.spec
    failed, can't parse<br>
    Could not make an srpm: Could not parse the spec, exited 1<br>
    <br>
    Obviously it because () in construction, but they in quotes!?<br>
    Changing it to:<br>
    %if %( php -r "echo \(version_compare\(PHP_VERSION, '5.3.0',
    '&gt;='\) ? 1 : 0\);" &amp;&gt;/dev/null || echo 0 )<br>
    give me chance build package. See
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="http://koji.fedoraproject.org/koji/taskinfo?taskID=3341569">http://koji.fedoraproject.org/koji/taskinfo?taskID=3341569</a>
    but it also doesn't work as intended, patches doesn't applied:
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a
href="http://koji.fedoraproject.org/koji/getfile?taskID=3341573&amp;name=build.log">http://koji.fedoraproject.org/koji/getfile?taskID=3341573&amp;name=build.log</a><br>
    <br>
    If I redirecting to null only stderr and remove parenthesis
    escaping:<br>
    %if %( php -r "echo (version_compare(PHP_VERSION, '5.3.0', '&gt;=')
    ? 1 : 0);" 2&gt;/dev/null || echo 0 )<br>
    package also built:
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="http://koji.fedoraproject.org/koji/taskinfo?taskID=3341605">http://koji.fedoraproject.org/koji/taskinfo?taskID=3341605</a>
    and rpm do what I want:
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a
href="http://koji.fedoraproject.org/koji/getfile?taskID=3341605&amp;name=build.log">http://koji.fedoraproject.org/koji/getfile?taskID=3341605&amp;name=build.log</a><br>
    <br>
    So, it seams I completely don't understand rpm expression parsing
    logic:<br>
    1) Why "&amp;&gt;/dev/null" is incorrect? Independent on shell were
    it intended to be parsed, macros just should pass content of macros
    %() to shell and return string value. Or not?<br>
    2) Why "&amp;&gt;/dev/null" became correct if I escape parenthesis
    (even if command really not work)?<br>
    3) Why initial command work before and not now? Is it bug or
    expected change?<br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      With best wishes, Pavel Alexeev (aka Pahan-Hubbitus). For fast
      contact with me use jabber: <a class="moz-txt-link-abbreviated" href="mailto:Hubbitus@jabber.ru">Hubbitus@jabber.ru</a></div>
  </body>
</html>