Grepping through all Fedora specfiles?

Tony Breeds tony at bakeyournoodle.com
Wed Jul 24 00:33:45 UTC 2013


On Tue, Jul 23, 2013 at 10:01:51PM +0300, Ville Skyttä wrote:
> On 2013-07-23 08:04, Ralf Corsepius wrote:
> > 
> > For similar purposes, I have been using the CSV table returned by
> > "https://admin.fedoraproject.org/pkgdb/lists/bugzilla?tg_format=plain"
> > 
> > I am downloading the CSV-table and then use scripts to filter the CSV 
> > into lists and subsequently to feed them into further scripts for 
> > further processing.
> 
> I've used that approach too sometime and it certainly works, but it'll
> take ages to clone every package from git (even though the cloning can
> be trivially parallelized with xargs -P or parallel).

Sorry to be dense but if you know the package name and you only care
about the specfile can't you do something like:

base_url='http://pkgs.fedoraproject.org'

for pkg in $pkgs ; do
	wget -o $pkg.log -O $pkg.spec \
		"$base_url/cgit/${pkg}.git/plain/${pkg}.spec?id=HEAD" &
done

You can even vary HEAD, to be f18,f19 to look at other releases.

It saves you the git clone, which across the whole pakage base could be
significant.

Yours Tony
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20130724/5332d34e/attachment.sig>


More information about the devel mailing list