Elliot says this one actually works!
authorewt <devnull@localhost>
Mon, 25 Nov 1996 16:05:08 +0000 (16:05 +0000)
committerewt <devnull@localhost>
Mon, 25 Nov 1996 16:05:08 +0000 (16:05 +0000)
CVS patchset: 1201
CVS date: 1996/11/25 16:05:08

autodeps/solaris.prov

index 29119c1..627a95f 100644 (file)
@@ -3,16 +3,9 @@
 # This script reads filenames from STDIN and outputs any relevant provides
 # information that needs to be included in the package.
 
-filelist=`grep "\\.so" | grep -v "^/lib/ld.so" | sed -e 's/@//g' | xargs file | grep "ELF.*dynamic lib" | cut -d: -f1`
+filelist=`grep "lib.*\\.so" | xargs file -L 2>/dev/null | grep "ELF.*dynamic 
+lib" | cut -d: -f1 | sort -u`
+for I in $filelist; do
+        basename $I
+done
 
-for f in $filelist; do
-    soname=`objdump $f --section=.dynstr 2> /dev/null | tr '\0' '\n' | tail -1`
-
-    if [ "$soname" != "" ]; then
-        if [ "$soname" != "_end" ]; then
-            echo $soname
-        else
-            echo ${f##*/}
-        fi
-    fi
-done | sort -u