Mailinglist Archive: opensuse-buildservice (260 mails)

< Previous Next >
Re: [opensuse-buildservice] How to handle BuildRequires in spec file like "/usr/bin/perl"?
  • From: Jian Lee <lijian.gnu@xxxxxxxxx>
  • Date: Wed, 23 Dec 2009 18:09:09 +0800
  • Message-id: <200912231809.11851.lijian.gnu@xxxxxxxxx>
hi, Michael

Thanks for you reply


Oh, I'm confuesed on BuildPrereq too. But many old spec file have this
description.


I'm treat it as the same as BuildRequires, so I modified the
Build/Rpm.pm to contain it in the pool of BuildRequires:

-------------------------------------------------
# grep -i BuildPrereq /usr/lib/build/Build/Rpm.pm
$ifdeps = 1 if $line =~ /^(BuildRequires|BuildPrereq|
BuildConflicts|\#\!BuildIgnore)\s*:\s*(\S.*)$/i;
if ($preamble && ($line =~ /^(BuildRequires|BuildPrereq|
BuildConflicts|\#\!BuildIgnore)\s*:\s*(\S.*)$/i)) {
if (lc($what) ne 'buildrequires' and lc($what) ne 'buildprereq')
{
===========================================


Maybe this example for "/usr/bin/perl" is not suitable. but many
BuildRequires have this style also.


thanks,


Wednesday 23 December 200917:56:08Michael Schroeder <mls@xxxxxxx> 写道:

On Wed, Dec 23, 2009 at 11:01:37AM +0800, Jian Lee wrote:
Too many srpms in my project have a old description about
BuildRequires in the spec file like that:

--------------------
BuildPrereq: /usr/bin/perl
==========================

but the /usr/lib/build/Build.pm have nothing to support this
description.

The /usr/lib/build/expanddeps just get the
BuildRequires,Requires,Provides of every pkgs. and the pkg which
would
be build could not get a BuildRequires like "/usr/bin/perl" from
those
infomation.

If to do this, must add a infomation of "rpm -ql XXX.rpm" to depends
file.

-------------------
F:... XXX.rpm
P:... `rpm -ql XXX.rpm`
R:...
I:...
===================

Is there a better idea ?

Yes, we should add a way to tell the build service in the project
configuration that /usr/bin/perl comes from the perl package.

Btw, BuildPrereq? Why the Pre? I can't imagine any use for it
here...

Cheers,
Michael.

--
Michael Schroeder mls@xxxxxxx
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}




----

Jian Lee [ http://jianlee.ylinux.org ]
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups