[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Getting dependencies from spec files
- From: Eli Carter <eli carter inet com>
- To: rpm-list redhat com
- Subject: Re: Getting dependencies from spec files
- Date: Wed, 19 Nov 2003 12:09:46 -0600
Panu Matilainen wrote:
On Tue, 18 Nov 2003, Eli Carter wrote:
All,
Is there a way to get rpmbuild to display the BuildPreReqs given a spec
file, but without initiating a build?
And then, what about PreReqs and Requires?
Not really. To some extent you can get PreReqs and Requires out of a spec
with 'rpm -q --specfile --requires foo.spec' but that (obviously) doesn't
include automatically generated dependencies and for build dependencies I
don't think there's a way to get that out of a spec file.
That said, "mach" does exactly that by parsing the spec manually, if you
wish you could extract the relevant code from there...
http://thomas.apestaart.org/projects/mach/
Well, for what I'm doing, I can live with
grep -i -e '^[[:space:]]*BuildPreReq' $SRCDIR/$package/$package.spec |
sed 's/.*://' | sed 's/,/ /g
It just gets false positives when there's a %ifdef around a Buildprereq.
Thanks for the pointer to "mach"... I'll have to look into that another
time.
Eli
--------------------. "If it ain't broke now,
Eli Carter \ it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]