f9adc4
#!/bin/sh
f9adc4
f9adc4
# Finds requirements provided outside of the current file set
f9adc4
f9adc4
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
f9adc4
f9adc4
provides=`echo $filelist | /usr/lib/rpm/find-provides`
f9adc4
f9adc4
{
f9adc4
for f in $filelist ; do
f9adc4
	echo $f | /usr/lib/rpm/find-requires | while read req ; do
f9adc4
		found=0
f9adc4
		for p in $provides ; do
f9adc4
			if [ "$req" = "$p" ]; then
f9adc4
				found=1
f9adc4
			fi
f9adc4
		done
f9adc4
		if [ "$found" = "0" ]; then
f9adc4
			echo $req
f9adc4
		fi
f9adc4
	done
f9adc4
done
f9adc4
} | sort -u