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