Closed
Description
There seems to be a timing problem when expanding
%bcond_without patches
...
%prep
%autosetup -c %{?with_patches:-p1}%{!?with_patches:-N}
This was my original version in sgb.spec (developed with debbuild) where the conditional macro %{?with_patches:-p1} does not produce the expected -p1 option for %autosetup, independent of the use of --without patches on the CLI.
Using classic %if..%else..%endif logic works, but this takes five LOC and I'd rather like the single-line solution.
This occurs with rpmbuild 4.12.0.1 on Kubuntu 16.04.
As an aside I report that adding BuildArch: x86_64 to sgb.spec makes rpmbuild ignore the patches completely.