On Fri, Aug 21, 2009 at 10:10:15AM +0200, Adrian Schröter wrote:
Am Freitag, 21. August 2009 02:03:24 schrieb Paul Elliott:
On Wed, Aug 19, 2009 at 09:44:35AM +0200, Adrian Schröter wrote:
%if 0%{?debian_version}
I have experimented with conditionals like this and the behaviour I observe is that the build service behaves like they are always false.
Substitute, required works if used unconditionaly. But if you use %if expressions like the above, and it behaves as if it is always false.
I am trying to vary the way my project builds depending on platform. Therefore I should not define, but only use these macros.
Where are these expressions documented?
They are rpm like, so rpm macros are basically the specification.
What is and example project that uses expressions like this to vary behaviour depending on platform?
osc meta prjconf openSUSE:Tools This does not use the %if 0%{?debian_version} construct it does use '%if "%_repository" == "images"' However:
-----------------cut here with a chain saw osc meta prjconf openSUSE:Tools %if "%_repository" == "images" Type: kiwi Repotype: none Patterntype: none %endif # Test build-compare #%if "%_repository" == "openSUSE_11.1" #Support: build-compare #Keep: build-compare #%endif Prefer: openSUSE-release openSUSE-release-ftp Substitute: kiwi-filesystem:ext3 e2fsprogs procps psmisc reiserfs Substitute: kiwi-boot:netboot kiwi-desc-netboot kiwi-desc-xenboot ncurses-utils curl dhcpcd iputils nbd net-tools netcfg nfs-client parted grub mdadm cromfs Substitute: kiwi-packagemanager:zypper zypper Substitute: kiwi-packagemanager:smart smart -------------------------------------------cut here with a chain saw. My experiments show that %if 0%{?debian_version} acts as if it is always false. -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117