#! /bin/bash

wget --quiet -O /tmp/owners.list 'http://cvs.fedora.redhat.com/viewcvs/*checkout*/owners/owners.list?root=extras'

while read pkg dash pgkver requires dep; 
do
	packagedep="$(repoquery --queryformat="foo123 "'%{NAME}' --whatprovides ${dep} | grep -m 1 '^foo123 ' | sed 's/foo123 //')"
	owner="$(grep \|${packagedep}\| /tmp/owners.list | cut -d '|' -f 4 | sed 's/@/_AT_/') "
	echo "Package $pkg requires $packagedep which is owned by $owner in Fedora"
done 

rm /tmp/owners.list
