|
|
;; | ;; |
-P|--no-progress) | -P|--no-progress) |
progress() { :; } | progress() { :; } |
|
;; |
-q|--quiet) | -q|--quiet) |
echo_v() { :; } | echo_v() { :; } |
progress() { :; } | progress() { :; } |
|
|
else | else |
[[ $LIST ]] || die 1 "$LIST" 'is undefined! (This is a bug.)' | [[ $LIST ]] || die 1 "$LIST" 'is undefined! (This is a bug.)' |
set_trap "$LIST.3_rebuild" | set_trap "$LIST.3_rebuild" |
|
set_trap "$LIST.3_ldd_errors" |
rm -f "$LIST.3"* | rm -f "$LIST.3"* |
files=($(<"$LIST.1_files")) | files=($(<"$LIST.1_files")) |
numFiles="${#files[@]}" | numFiles="${#files[@]}" |
|
|
done | done |
if [[ $SEARCH_BROKEN ]]; then | if [[ $SEARCH_BROKEN ]]; then |
# Look for missing version | # Look for missing version |
for target_file in $( |
while read target_file; do |
awk '/no version information available/{ |
|
gsub("[()]", "", $NF); |
|
print $NF |
|
}' "$LIST.3_ldd_errors" | sort -u |
|
); do |
|
echo "obj $target_file" >> "$LIST.3_rebuild" | echo "obj $target_file" >> "$LIST.3_rebuild" |
echo_v " broken $target_file (no version information available)" | echo_v " broken $target_file (no version information available)" |
done |
done < <( |
|
# Regexify LD_LIBRARY_MASK. Exclude it from the search. |
|
LD_LIBRARY_MASK="${LD_LIBRARY_MASK//$'\n'/|}" |
|
awk -v ldmask="(${LD_LIBRARY_MASK//./\\\.})" ' |
|
/no version information available/ && !/ldmask/{ |
|
gsub(/[()]/, "", $NF) |
|
if (seen[$NF]++) next |
|
print $NF |
|
}' "$LIST.3_ldd_errors" |
|
) |
fi | fi |
[[ -r $LIST.3_rebuild && -s $LIST.3_rebuild ]] || clean_exit | [[ -r $LIST.3_rebuild && -s $LIST.3_rebuild ]] || clean_exit |
einfo "Generated new $LIST.3_rebuild" | einfo "Generated new $LIST.3_rebuild" |