Add capability to check libtool .la files for non-existant references
authorfuzzyray <fuzzyray@gentoo.org>
Wed, 18 Jan 2006 20:04:20 +0000 (20:04 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Wed, 18 Jan 2006 20:04:20 +0000 (20:04 -0000)
svn path=/; revision=273

trunk/ChangeLog
trunk/src/revdep-rebuild/revdep-rebuild

index 729dd0b5d4c8817091477cd7a971873648ced2fe..76761164be337a1e7c81ad1dd61f7171db6167cb 100644 (file)
@@ -1,3 +1,7 @@
+2006-01-18 Paul Varner <fuzzyray@gentoo.org>
+       * revdep-rebuild: Add capability to check libtool .la files for
+       non-existant references.
+
 2006-01-06 Paul Varner <fuzzyray@gentoo.org>
        * revdep-rebuild: Fix revdep-rebuild to play nicely with portage-2.1
        (Bug 118124)
index f08a654a3ac08a6426d40f3c37b8daefcbda7bfe..d6bd69ab9461b2e86d4e08005da76f7fbb19d3fc 100755 (executable)
@@ -339,11 +339,11 @@ else
                        exit 1
                else
                        # using -perm +u+x for find command
-                       find $SEARCH_DIRS -type f \( -perm +u+x -o -name '*.so' -o -name '*.so.*' \) 2>/dev/null | sort | uniq >$LIST.0_files
+                       find $SEARCH_DIRS -type f \( -perm +u+x -o -name '*.so' -o -name '*.so.*' -o -name '*.la' \) 2>/dev/null | sort | uniq >$LIST.0_files
                fi
        else
                # using -perm /u+x for find command
-               find $SEARCH_DIRS -type f \( -perm /u+x -o -name '*.so' -o -name '*.so.*' \) 2>/dev/null | sort | uniq >$LIST.0_files
+               find $SEARCH_DIRS -type f \( -perm /u+x -o -name '*.so' -o -name '*.so.*' -o -name '*.la' \) 2>/dev/null | sort | uniq >$LIST.0_files
        fi
 
        # Remove files that match SEARCH_DIR_MASK
@@ -384,7 +384,7 @@ else
        set_trap "$LLIST.3_rebuild"
        LD_MASK="\\(    $(echo "$LD_LIBRARY_MASK" | sed 's/\./\\./g;s/ / \\|    /g') \\)"
        echo -n >$LLIST.3_rebuild
-       cat $LIST.1_files | while read FILE ; do
+       cat $LIST.1_files | egrep -v '*\.la$' | while read FILE ; do
        # Note: double checking seems to be faster than single
        # with complete path (special add ons are rare).
        if ldd "$FILE" 2>/dev/null | grep -v "$LD_MASK" | $SONAME_GREP -q "$SONAME_SEARCH" ; then
@@ -429,6 +429,17 @@ else
                fi
        fi
        done
+       if $SEARCH_BROKEN ; then
+               cat $LIST.1_files | egrep '*\.la$' | while read FILE ; do
+                       for depend in $(grep '^dependency_libs' $FILE | awk -F'=' '{print $2}' | sed "s/'//g") ; do
+                               [ ${depend:0:1} != '/' ] && continue
+                               if [ ! -e $depend ] ; then
+                                       echo "$FILE" >>$LLIST.3_rebuild
+                                       echo_v "  broken $FILE (requires ${depend})"
+                               fi
+                       done
+               done
+       fi
        echo -e " done.\n  ($LLIST.3_rebuild)"
 fi