Distinguishing architectures in spec file leads to failed requirements for required packages that are available

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Distinguishing architectures in spec file leads to failed requirements for required packages that are available

Thomas Wagner
Hi!

Building encfs requires tinyxml2-3, which is part of Leap 42.2
Tumbleweed but not available for all architectures.
There is currently the following condition in the spec file:
  ...
  %if 0%{?sle_version}>=120200 || 0%{?suse_version} > 1320
  %define os_has_tinyxml2 1
  %else
  %define os_has_tinyxml2 0
  %endif
  ...
  %if %{os_has_tinyxml2}
  BuildRequires:  tinyxml2-devel
  %endif
  ...

I changed the condition to a more specific one which contains the
corresponding architectures:
  %if ( 0%{?leap_version}>=420200 && %{_arch} == x86_64 ) || (
0%{?suse_version} > 1320 && %{_arch} != ppc )

My new condition works and os_has_tinyxml2 is set correctly (output of
condition remains the same for unaffected architectures), but later on,
I get errors "tinyxml2-devel is needed" for those architectures that
definitely have tinyxml2-devel, e.g. all Factory other than ppc and Leap
42.2 x86_64.

Why does changing the condition result in a failed requirement, even if
the output of the condition is the same?

best regards

Thomas
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]