]> git.ipfire.org Git - people/ms/pakfire.git/blobdiff - tools/find-provides
Remove the urlgrabber fork hack.
[people/ms/pakfire.git] / tools / find-provides
index 51efa9e65f5f27aff1fc2feec8f16e8b5b660fff..06b3c4797bc390bc150506909deb720fa0fbfda2 100755 (executable)
@@ -14,11 +14,23 @@ pkgconfig_files=
 # Walk through all file files and see what we have got here.
 while read file; do
        case "${file}" in
-               */usr/lib*/python*/*.so)
+               */usr/lib/debug/*|*/usr/src/debug/*)
+                       # Skip all debuginfo files.
+                       continue
+                       ;;
+               */usr/lib*/python*/*.so*)
                        # Do not show python shared objects in provides list.
                        ;;
+               */usr/lib*/gconv/*)
+                       # Skip gconv files.
+                       continue
+                       ;;
                *.so*)
-                       binary_files="${binary_files} ${file}"
+                       # Skip symlinks for performance reasons.
+                       [ -L "${file}" ] && continue
+
+                       file_is_elf ${file} >/dev/null 2>&1 && \
+                               binary_files="${binary_files} ${file}"
                        ;;
                *.pm)
                        # This file is a perl module. We check them later.
@@ -32,8 +44,6 @@ done < ${FILELIST}
 
 # Search for SONAMEs in all binary files.
 for file in ${binary_files}; do
-       [ -L ${file} ] && continue
-
        soname=$(file_get_soname ${file})
 
        # If the files does not have a SONAME, we will
@@ -59,7 +69,6 @@ for file in ${binary_files}; do
                /Version definitions:/ { START=1; }
                /^[0-9]/ && (START==1) { print $4; }
                /^$/ { START=0; }' | \
-                grep -v ${soname} | \
                 while read symbol ; do
                     echo "${soname}(${symbol})$(${is_64} && echo ${mark64} | sed 's/()//')"
                 done
@@ -80,9 +89,6 @@ if [ -n "${pkgconfig}" -a -x "${pkgconfig}" ]; then
                        # We have a dependency.  Make a note that we need the pkgconfig
                        # tool for this package.
                        echo "pkgconfig(${n}) ${r} ${v}"
-
-                       # The dependency on the pkgconfig package itself.
-                       echo "pkgconfig"
                done
        done | sort -u
 fi