On Wed, Oct 5, 2016 at 12:24 PM, Dominique Leuenberger / DimStar
On Wed, 2016-10-05 at 12:17 +0200, Roger Oberholtzer wrote:
On Wed, Oct 5, 2016 at 10:53 AM, Dominique Leuenberger / DimStar
wrote: you can APPLY the patch conditionally - but please don't add it to the src.rpm conditionally.
And to do this, the Patch: directives are not conditional. So far okay.
But how to make the later %patch calls conditional without using %ifarch (which seems to be resolved when the source RPM is created)?
No; the %prep / %build / %install phases are pristine in the .spec file and are thus considered by rpmbuild; in fact, the .spec file is never modified before added to the .spec file (except the cases which Johannes listed already - but those are evil to start with)
With this part of the .spec
Name: FOO %ifarch x86_64 Patch0: x86_64.patch %else Patch0: i586.patch %endif
[...]
%prep %setup %patch0
So if I wanted to accomplish this so the tests happened in my local rpmbuild --rebuild, would I do this: Name: FOO Patch0: x86_64.patch Patch1: i586.patch [...] %prep %setup %ifarch x86_64 %patch0 %else %patch1 %endif Not that I would do this sort of thing. But just so I understand. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org