On Thursday, 06 December 2007, at 22:57:27 (+0100), Mildred wrote: > I would like to create a probram that would download automatically > the source files of packages given a spec file and build it using > rpmbuild. I believe rpmbuild in RPM 5 already does this. > But I just wonder how to extract the source URLs from the spec > file. I can't use standard srep and sed since often the Source line > contains variables that need to be resolved. > > I found that rpm has an option --specfile that seems deigned for > that purpose. But rpm do not seems to be aware of the source > filenames unfortunately. > > Does anyone knows how I could extract this information without > writing a spec file parser ? rpm --eval "`cat foo.spec`" will get you most of the way there. Michael -- Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <mej@xxxxxxxxx> Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org) ----------------------------------------------------------------------- "I have failed over and over again in my life. And that is why I succeed." -- Michael Jordan _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list