Mailinglist Archive: opensuse-buildservice (233 mails)
| < Previous | Next > |
Re: [opensuse-buildservice] Bug or unimplemented?
- From: Marcus Rueckert <mrueckert@xxxxxxx>
- Date: Thu, 24 May 2007 19:32:22 +0200
- Message-id: <20070524173222.GI5578@xxxxxxx>
On 2007-05-24 11:29:03 -0600, Troy Telford wrote:
> I've got a spec file (not on build.opensuse.org, though), that has the
> following syntax:
>
> %{?_with_foo:BuildRequires: foo}
>
> With a non-buildservice RPM build, this means that if the macro '_with_foo' is
> defined, 'foo' is a build requirement.
>
> It's a useful syntax; I have to provide a source RPM that can give the user
> customization options by re-compiling the srpm with various "--with foo"
> options (or to negate defaults by using "--without foo".)
>
> What I'm seeing is the following when I try to build the package using the
> buildservice: %{_with_foo} is set in the spec file as the default (so RPM
> sees "BuildRequires: foo")
>
> rpmbuild evaluates the statement properly: it requires package 'foo' as a
> requirement for compilation.
>
> The problem is that OBS isn't installing the 'foo' package before starting
> rpmbuild. When rpmbuild checks that its buildrequires are satisfied, it
> isn't finding 'foo', and the compile aborts.
>
> Obviously, a workaround is to use the
>
> %if 0%{?obensuse_bs}
> # bs-specific part here
> %endif
>
> syntax.
>
> But this doesn't seem to be one of the cases where using the syntax is
> appropriate, as it shouldn't be necessary to know when the buildservice will
> or won't detect the same build requirements 'rpmbuild' does.
i think that isnt implemented in the spec file parser. but imho ... the
obvious workaround ist not
%if 0%{?obensuse_bs}
but:
%if %{?_with_foo}
BuildRequires: foo
%endif
which is essentially the same as:
%{?_with_foo:BuildRequires: foo}
dont think so?
darix
--
openSUSE - SUSE Linux is my linux
openSUSE is good for you
www.opensuse.org
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
> I've got a spec file (not on build.opensuse.org, though), that has the
> following syntax:
>
> %{?_with_foo:BuildRequires: foo}
>
> With a non-buildservice RPM build, this means that if the macro '_with_foo' is
> defined, 'foo' is a build requirement.
>
> It's a useful syntax; I have to provide a source RPM that can give the user
> customization options by re-compiling the srpm with various "--with foo"
> options (or to negate defaults by using "--without foo".)
>
> What I'm seeing is the following when I try to build the package using the
> buildservice: %{_with_foo} is set in the spec file as the default (so RPM
> sees "BuildRequires: foo")
>
> rpmbuild evaluates the statement properly: it requires package 'foo' as a
> requirement for compilation.
>
> The problem is that OBS isn't installing the 'foo' package before starting
> rpmbuild. When rpmbuild checks that its buildrequires are satisfied, it
> isn't finding 'foo', and the compile aborts.
>
> Obviously, a workaround is to use the
>
> %if 0%{?obensuse_bs}
> # bs-specific part here
> %endif
>
> syntax.
>
> But this doesn't seem to be one of the cases where using the syntax is
> appropriate, as it shouldn't be necessary to know when the buildservice will
> or won't detect the same build requirements 'rpmbuild' does.
i think that isnt implemented in the spec file parser. but imho ... the
obvious workaround ist not
%if 0%{?obensuse_bs}
but:
%if %{?_with_foo}
BuildRequires: foo
%endif
which is essentially the same as:
%{?_with_foo:BuildRequires: foo}
dont think so?
darix
--
openSUSE - SUSE Linux is my linux
openSUSE is good for you
www.opensuse.org
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx
| < Previous | Next > |