From 90a218d691c6627ab07ddacd172dda93c579a313 Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Wed, 18 Jan 2006 20:04:20 +0000 Subject: [PATCH] Add capability to check libtool .la files for non-existant references svn path=/; revision=273 --- trunk/ChangeLog | 4 ++++ trunk/src/revdep-rebuild/revdep-rebuild | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 729dd0b..7676116 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2006-01-18 Paul Varner + * revdep-rebuild: Add capability to check libtool .la files for + non-existant references. + 2006-01-06 Paul Varner * revdep-rebuild: Fix revdep-rebuild to play nicely with portage-2.1 (Bug 118124) diff --git a/trunk/src/revdep-rebuild/revdep-rebuild b/trunk/src/revdep-rebuild/revdep-rebuild index f08a654..d6bd69a 100755 --- a/trunk/src/revdep-rebuild/revdep-rebuild +++ b/trunk/src/revdep-rebuild/revdep-rebuild @@ -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 -- 2.26.2