Spec depends on BuildRequires?

Rex Dieter rdieter at math.unl.edu
Tue Mar 11 15:02:13 UTC 2008


Richard W.M. Jones wrote:

> I've got a spec file which (edited) says:
> 
>   BuildRequires:  perl
>   BuildRequires:  perl-ExtUtils-Embed
> 
>   Requires: %(perl -MExtUtils::Embed -e ldopts | egrep -o
>   '/[^[:space:]]*CORE' | head -1)
> 
> It fails occasionally (but by no means always) in Koji, as for example
> here:

Would seem to fail always to me.  Here's something less fragile:

(forgive the long-line)
%global my_perl_req %(perl -MExtUtils::Embed -e ldopts 2> /dev/null |
egrep -o '/[^[:space:]]*CORE' | head -1)

%if "%{?my_perl_req}" != "%{nil}"
Requires: %{?my_perl_req}
%endif




More information about the fedora-devel-list mailing list