]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-find-requires
- added %%requires_eq_to and %%apache_modules_api macros
[packages/rpm.git] / rpm-find-requires
index e1db63e3537ea8ad8cbc0648632c04920b250a53..6f2331b643921473dca6dad1edc8ec214b570d81 100755 (executable)
@@ -25,16 +25,12 @@ elfliblist=`echo $liblist | xargs -r file | egrep  ":.* ELF" | cut -d: -f1 `
 aoutliblist=`echo $liblist | xargs -r file | egrep  -v ":.* ELF" | cut -d: -f1 `
 
 aoutexerequires=`for f in $aoutexelist; do
-    if [ -x $f ]; then
        ldd $f | awk '/=>/ { print $1 }'
-    fi
 done | sort -u | sed "s/['\"]/\\\&/g" | xargs -r -n 1 basename | grep -v 'libNoVersion.so' | sort -u
 `
 
 elfexerequires=`for f in $elfexelist; do 
-    if [ -x $f ]; then
        objdump -p $f|awk '/NEEDED/ {print $2}'
-    fi
 done | sed "s/['\"]/\\\&/g" | grep -v 'libNoVersion.so' | sort -u
 `
                
@@ -48,13 +44,14 @@ elflibrequires=`for f in $elfliblist; do
 done | sed "s/['\"]/\\\&/g" | grep -v 'libNoVersion.so' | sort -u
 `
 
-for f in $scriptlist; do
+scriptrequires=`for f in $scriptlist; do
     if [ -x $f ]; then
        head -1 $f | sed -ne '/^\#\!/p' | sed -e 's/^\#\![      ]*//' | cut -d" " -f1
     fi
 done | sort -u
+`
 
-for f in $liblist $exelist ; do
+elflibverrequires=`for f in $liblist $exelist ; do
     objdump -p $f | awk '
        BEGIN { START=0; LIBNAME=""; }
        /Version References:/ { START=1; }
@@ -66,24 +63,24 @@ for f in $liblist $exelist ; do
        /^$/ { START=0; }
     '
 done | sort -u
+`
 # Generate name of rpm package provides library
 
 allrequires="$aoutexerequires
 $elfexerequires
 $aoutlibrequires
-$elflibrequires"
+$elflibrequires
+$elflibverrequires"
 
 if [ -f __rpm_noautoreq ] ; then
        for i in `cat __rpm_noautoreq`; do
+               scriptrequires=`echo $scriptrequires | sed "s!\<$i[[:space:]]*!!g"`
                allrequires=`echo $allrequires | sed "s!\<$i[[:space:]]*!!g"`
        done
 fi
 
-if [ -f __rpm_noautoreqdep ] ; then
-       for i in `cat __rpm_noautoreqdep`; do
-               allrequires=`echo $allrequires | sed "s!\<$i[[:space:]]*!!g"`
-       done
-fi
+# omit autoreqdep for scriptrequires
+echo "$scriptrequires"
 
 # Delete all the provided stuff
 
@@ -100,5 +97,11 @@ notprovreqs=`echo "$allrequires"|awk -f .findreq_delprovs_$$`
 rm .findreq_delprovs_$$
 echo "$notprovreqs" | sort -u
 
+if [ -f __rpm_noautoreqdep ] ; then
+       for i in `cat __rpm_noautoreqdep`; do
+               notprovreqs=`echo $notprovreqs | sed "s!\<$i[[:space:]]*!!g"`
+       done
+fi
+
 echo "$notprovreqs" | LC_ALL=C xargs -r -- rpm -q --whatprovides --qf "%{NAME}\n"  2>/dev/null \
        | grep -v "no package provides" | sort -u
This page took 0.041715 seconds and 4 git commands to generate.