]> git.ipfire.org Git - people/stevee/pakfire.git/blobdiff - tools/find-provides
ccache optimizations: Use /tmp and enable compression.
[people/stevee/pakfire.git] / tools / find-provides
index 8a3e3cb3a83e0140e3e752f8de35bda36dfe6d72..06b3c4797bc390bc150506909deb720fa0fbfda2 100755 (executable)
@@ -14,10 +14,21 @@ pkgconfig_files=
 # Walk through all file files and see what we have got here.
 while read file; do
        case "${file}" in
+               */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*)
+                       # Skip symlinks for performance reasons.
+                       [ -L "${file}" ] && continue
+
                        file_is_elf ${file} >/dev/null 2>&1 && \
                                binary_files="${binary_files} ${file}"
                        ;;
@@ -33,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
@@ -60,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
@@ -81,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