openSUSE / obs-build

OBS build script, can be used with OBS or stand alone
GNU General Public License v2.0
130 stars 181 forks source link

Feature: support conditional ExclusiveArch #969

Closed vasiliy-ul closed 7 months ago

vasiliy-ul commented 7 months ago

The scheduler currently does not seem to evaluate conditionals:

https://github.com/openSUSE/obs-build/blob/b5debf616ee470fa2cf03371d272675c3714e308/Build/Rpm.pm#L790-L793

As a result, none of the following snippets work (i.e. the aarch64 build is always scheduled):

%if 0%{?is_opensuse}
ExclusiveArch:  x86_64 aarch64
%else
ExclusiveArch:  x86_64
%endif
%if 0%{?is_opensuse}
%define _exclusive_arches x86_64 aarch64
%else
%define _exclusive_arches x86_64
%endif
...
ExclusiveArch:  %{_exclusive_arches}
mlschroe commented 7 months ago

They are certainly evaluated. Can you please point me to a project in OBS where it doesn't seem to work?

vasiliy-ul commented 7 months ago

Ooops, seems I somehow messed up with the is_opensuse macro. Did one more checking and indeed, it works now. So my bad, and sorry for the noise. Closing the issue.