summaryrefslogtreecommitdiffstats
path: root/find-external-requires
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2011-07-19 18:11:52 +0200
committerRemi Collet <fedora@famillecollet.com>2011-07-19 18:11:52 +0200
commitf6e06628c2d64eb25814ff1a5201ca368e49cdd3 (patch)
tree6388a7bc68df9932dcddf49b26e983afbf820f43 /find-external-requires
lightning, import spec from rawhide
Diffstat (limited to 'find-external-requires')
-rwxr-xr-xfind-external-requires23
1 files changed, 23 insertions, 0 deletions
diff --git a/find-external-requires b/find-external-requires
new file mode 100755
index 0000000..d79db1d
--- /dev/null
+++ b/find-external-requires
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Finds requirements provided outside of the current file set
+
+filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
+
+provides=`echo $filelist | /usr/lib/rpm/find-provides`
+
+{
+for f in $filelist ; do
+ echo $f | /usr/lib/rpm/find-requires | while read req ; do
+ found=0
+ for p in $provides ; do
+ if [ "$req" = "$p" ]; then
+ found=1
+ fi
+ done
+ if [ "$found" = "0" ]; then
+ echo $req
+ fi
+ done
+done
+} | sort -u \ No newline at end of file