Index: revdep-rebuild =================================================================== --- revdep-rebuild (revision 540) +++ revdep-rebuild (working copy) @@ -620,28 +620,39 @@ } get_files() { + local remake_files_file= einfo "Collecting system binaries and libraries" if [[ -r "$FILES_FILE" && -s "$FILES_FILE" ]]; then - einfo "Found existing $FILES_FILE" - else - # Be safe and remove any extraneous temporary files - # Don't remove 0_env.rr - The first file in the array - rm -f "${FILES[@]:1}" + einfo "Found existing ${FILES_FILE}: checking its validity" + while read; do + if ! [[ -f $REPLY ]]; then + ewarn "$REPLY is an invalid listing" + ewarn "Replacing $FILES_FILE" + remake_files_file=1 + break + fi + done < "$FILES_FILE" + [[ remake_files_file ]] || return 0 + fi - clean_trap "$FILES_FILE" + # Be safe and remove any extraneous temporary files + # Don't remove 0_env.rr - The first file in the array + rm -f "${FILES[@]:1}" + clean_trap "$FILES_FILE" - if [[ $SEARCH_DIRS_MASK ]]; then - findMask=($SEARCH_DIRS_MASK) - findMask="${findMask[@]/#/-o -path }" - findMask="( ${findMask#-o } ) -prune -o" - fi - # TODO: Check this -- afaict SEARCH_DIRS isn't an array, so this should just be $SEARCH_DIRS? - find ${SEARCH_DIRS[@]} $findMask -type f \( -perm -u+x -o -perm -g+x -o -perm -o+x -o \ - -name '*.so' -o -name '*.so.*' -o -name '*.la' \) -print 2> /dev/null | - sort -u > "$FILES_FILE" || - die $? "find failed to list binary files (This is a bug.)" - einfo "Generated new $FILES_FILE" + if [[ $SEARCH_DIRS_MASK ]]; then + findMask=($SEARCH_DIRS_MASK) + findMask="${findMask[@]/#/-o -path }" + findMask="( ${findMask#-o } ) -prune -o" fi + + # TODO: Check this -- afaict SEARCH_DIRS isn't an array, so this should just be $SEARCH_DIRS? + find ${SEARCH_DIRS[@]} $findMask -type f \( -perm -u+x -o -perm -g+x -o -perm -o+x -o \ + -name '*.so' -o -name '*.so.*' -o -name '*.la' \) -print 2> /dev/null | + sort -u > "$FILES_FILE" || + die $? "find failed to list binary files (This is a bug.)" + einfo "Generated new $FILES_FILE" + } get_ldpath() { local COMPLETE_LD_LIBRARY_PATH