Mailinglist Archive: opensuse-buildservice (145 mails)

< Previous Next >
Re: [opensuse-buildservice] prj config to get oss repo?
On Nov 22, 11 12:05:50 +0100, Michael Schroeder wrote:
On Tue, Nov 22, 2011 at 11:25:15PM +1300, Volker Kuhlmann wrote:
I have found the problem.

%if 0%(vs="%{vers}"; test ${vs:0:3} = 4.5 && echo 1)

works just fine, except in the OBS for BuildRequires:. It does work in
the OBS in %description and %build.

Yeah, OBS can't expand %() for obvious reasons.

The "obvious" reasons are, that
* When building a package, the source server employs a
virtual machine, and %() shell expansions are honored.
* But when we evaluate BuildRequires, the source server does not employ
a virtual machine, and %() shell expansions are disabled for security
reasons.

This also causes those warnings:
Warning: spec file parser line 109: can't expand %(...)


I'd suggest to put a hardcoded define next to the define of vers

%define vers 4.5.3
%define vers_2digit 4.5

cheers,
JW-


--
o \ Juergen Weigert paint it green! __/ _=======.=======_
<V> | jw@xxxxxxx back to ascii! __/ _---|____________\/
\ | 0911 74053-508 __/ (____/ /\
(/) | _____________________________/ _/ \_ vim:set sw=2 wm=8
SUSE LINUX Products GmbH, GF: Jeff Hawn, J.Guild, F.Imendoerffer, HRB 16746
(AG Nuernberg), Maxfeldstrasse 5, 90409 Nuernberg, Germany

SuSE. Supporting Linux since 1992.
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >