![](https://seccdn.libravatar.org/avatar/c2245049e7e6a67166114fef782634e3.jpg?s=120&d=mm&r=g)
On 3/18/2008 at 17:45, Bernhard Walle <bwalle@suse.de> wrote: Hello,
can somebody help me in writing
%if %{undefined rhel_version} && %{undefined centos_version} # code %else # code %endif
in a way that the build in the OBS / SUSE_Linux_10.0 succeeds? I currently get a parser error. Thanks for your help.
you could simply use something like %if 0%{rhel_version}%{centos_version} == 0 #code %else #code %endif This should even work in OBS. But a suggestion for general coding practice: try not to negate questions like not RHEL and not Centos. why not asking if RHEL or Centos, then do something? Is normally much easier to achieve and to read later on. Dominique PS: no warranty on whatsoever.. I did not test this snipplet and I am not sure about the variables for rhel_version and centos_version (but they can easily be found in the obs projects config file normally). --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org