- Timestamp:
- Sep 30, 2006, 12:53:33 AM (19 years ago)
- Location:
- branches/stable/mindi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/deplist.txt
r859 r860 9 9 # 4. If you want to add something, just add it on its own line. K.I.S.S. 10 10 # 5. You must _not_ put a semicolon & comment after an entry. e.g. 'foo; #bar'. 11 # 6. All these worlds are yours except Europa. Attempt no landing there.12 11 13 12 #------------------------- STUFF ADDED BY THE USER ---------------------------- -
branches/stable/mindi/mindi
r859 r860 1103 1103 elif [ -h "$fname" ] && [ -x "$fname" ] ; then 1104 1104 echo "$fname is softlink" >> $LOGFILE 1105 # echo "$fname will not be LDD'd. It is a softlink to `WhatSoftlinkPointsTo $fname`, which should already be in queue to be analyzed." >> $LOGFILE1106 # echo "$fname"1107 1105 else 1108 1106 ldd $fname 2> /dev/null | ProcessLDD $fname … … 1111 1109 } 1112 1110 1111 # Give all symlinks recursively of a full path name 1112 ReadAllLink() { 1113 file="$1" 1114 1115 if [ ! -h $file ]; then 1116 echo "$file" 1117 return 0 1118 fi 1119 1120 link=`readlink $file` 1121 if [ "`dirname $link | cut -c1`" = "/" ]; then 1122 echo "$link `ReadAllLink $link`" 1123 else 1124 echo "$link `dirname $file`/`ReadAllLink $link`" 1125 fi 1126 } 1113 1127 1114 1128 … … 1116 1130 local i path fname_to_find location output resolved tmp stub cache_id loclist 1117 1131 fname_to_find="$1" 1118 if [ "$FILE_CACHE" ] ; then1119 touch $FILE_CACHE1120 output=""; cache_id=`echo $fname_to_find | md5sum`1121 output=`sed -n -e "s/^$cache_id //p" $FILE_CACHE`1122 if [ ! "$output" = "" ] ; then1123 echo "$output"1124 return 01125 fi1126 fi1127 1132 if echo "$fname_to_find" | grep -x "/.*" ; then 1128 1133 output="$fname_to_find" 1129 location="$fname_to_find" 1130 while [ -h "$location" ] ; do 1131 resolved=`WhatSoftlinkPointsTo $location` 1132 location=$resolved 1133 output="$location $output" 1134 done 1134 if [ -h "$output" ] ; then 1135 output="`ReadAllLink $output` $output" 1136 fi 1135 1137 echo "$output" 1136 1138 return 0 … … 1139 1141 for path in /etc /usr /usr/bin /usr/sbin /bin /usr/X11R6/bin /sbin /usr/local/bin /usr/local/sbin /usr/lib /usr/lib64 /usr/lib64/* /lib /lib64 /lib64/* /usr/local/lib /usr/local/lib64 /usr/local/lib64/* /usr/X11R6/lib /usr/X11R6/lib64 /usr/X11R6/lib64/* ; do 1140 1142 [ ! -d "$path" ] && continue 1141 location=`echo "$path/$fname_to_find" | tr -s '/' '/'` 1142 if echo "$location" | grep "lib/lib" 2> /dev/null ; then 1143 loclist=`find $path -maxdepth 1 | grep -F "$fname_to_find"` 1144 else 1145 loclist=$location 1146 fi 1147 for location in $loclist ; do 1143 for location in "$path/$fname_to_find" ; do 1148 1144 [ ! -e "$location" ] && continue 1149 1145 output="$location $output" 1150 copies_found=$(($copies_found+1)) 1151 while [ -h "$location" ] ; do 1152 resolved=`WhatSoftlinkPointsTo $location` 1153 location=$resolved 1154 output="$location $output" 1155 done 1156 # resolved=`file $location | $AWK '{print $NF;}'` 1157 # if [ "`echo "$resolved" | grep -F "/"`" = "" ] ; then 1158 # stub=`dirname $location` 1159 # output="/$stub/$resolved $output" 1160 # fi 1161 # fi 1146 if [ -h "$location" ] ; then 1147 output="`ReadAllLink $location` $location $output" 1148 fi 1162 1149 done 1163 1150 done 1164 1151 if [ "$output" = "" ] ; then 1165 # echo "$fname_to_find not found" >> /dev/stderr 1166 return 1 1152 return 1 1167 1153 fi 1168 1154 echo "$output" 1169 [ "$FILE_CACHE" ] && echo -ne "$cache_id $output\n" >> $FILE_CACHE1170 1155 return 0 1171 1156 } … … 2347 2332 incoming=`echo "$incoming" | sed '/[[:blank:]]*.*[[:blank:]]*=>[[:blank:]]*(.*/d ; s/[[:blank:]]*.*[[:blank:]]*=>[[:blank:]]*\(\/.*\)/\1/ ; s/[[:blank:]]*\(\/.*\)[[:blank:]]*(.*/\1/'` 2348 2333 for f in `echo "$incoming"` ; do 2334 echo "$f" 2349 2335 if [ -h "$f" ]; then 2350 2336 g=`readlink $f` 2351 2337 if [ -e "$g" ]; then 2352 echo "$ f $g"2338 echo "$g" 2353 2339 else 2354 echo "Problem with ldd on $f" 2355 echo "$f" 2340 if [ "`echo $g | cut -c1`" != "/" ] ; then 2341 # that link is in the same dir 2342 g="`dirname $f`/$g" 2343 if -e "$g" ]; then 2344 echo "$g" 2345 else 2346 echo "Problem with ldd on $f" >> $LOGFILE 2347 fi 2348 else 2349 echo "Problem with ldd on $f" >> $LOGFILE 2350 fi 2356 2351 fi 2357 2352 else 2358 if [ -e "$f" ]; then 2359 echo "$f" 2360 else 2361 echo "Problem with ldd on $f" 2353 if [ ! -e "$f" ]; then 2354 echo "Problem with ldd on $f" >> $LOGFILE 2362 2355 fi 2363 2356 fi … … 2426 2419 cd $old_pwd 2427 2420 } 2428 2429 2430 2431 EliminateRelatives() {2432 # eliminate /../../..... from path string2433 local orig i old_i newo2434 newo=$12435 while [ "`echo "$newo" | grep "\.\."`" ] ; do2436 orig="`echo "$newo" | tr -s '/' '/'`"2437 # echo "orig=$orig"2438 newo="/"2439 old_i=""2440 for i in `echo "$orig" | tr '/' ' '` ; do2441 if [ ! "$old_i" ] ; then2442 old_i=$i2443 continue2444 fi2445 if [ "$old_i" ] && [ "$i" = ".." ] ; then2446 if [ "$old_i" = ".." ] ; then2447 newo="$newo"$old_i/2448 # echo "two --- $old_i $i"2449 old_i="$i"2450 continue2451 # else2452 # echo "swallowing ($old_i $i)"2453 fi2454 elif [ "$old_i" != ".." ] ; then2455 newo="$newo"$old_i/2456 fi2457 old_i=$i2458 done2459 newo="$newo"$i2460 done2461 echo "$newo"2462 }2463 2464 2465 WhatSoftlinkPointsTo() {2466 local orig new resolved2467 orig=$12468 new=`ls -l $orig | tr -s ' ' '\t' | $AWK '{printf $NF;}'`2469 if [ "`echo "$new" | cut -d'/' -f1`" ] ; then2470 resolved=`dirname $orig`/$new2471 else2472 resolved=$new2473 fi2474 EliminateRelatives $resolved2475 }2476 2477 2478 2479 2421 2480 2422 … … 2510 2452 resolved=$1 2511 2453 while [ -h "$resolved" ] ; do 2512 resolved=` WhatSoftlinkPointsTo$resolved`2454 resolved=`readlink -f $resolved` 2513 2455 done 2514 2456 echo "$resolved" … … 3245 3187 done 3246 3188 3247 FILE_CACHE=$TMP_ROOT/mindi-file-loc-cache3248 3189 KERN_DISK_MADE="" 3249 3190
Note:
See TracChangeset
for help on using the changeset viewer.