Changeset 2599


Ignore:
Timestamp:
Mar 17, 2010, 3:55:47 AM (10 years ago)
Author:
bruno
Message:

r3743@localhost: bruno | 2010-03-16 01:44:07 +0100

  • Improve log results for mindi by avoiding useless ops
  • Fix a bug on Mandriva modules analysis (at least)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/mindi

    r2598 r2599  
    303303            LogFile "Adding as deps $resolved to filelist"
    304304            vanilla_resolved_name=`echo "$resolved" | sed -e 's/i[5-7]86//' -e 's/cmov//' -e 's/nosegneg//' | tr -s '/' '/'`
    305             mkdir -p $outdir$resolved> /dev/null 2> /dev/null
    306             rmdir $outdir$resolved > /dev/null 2> /dev/null
    307             ln -sf $vanilla_resolved_name $outdir$resolved
    308             LogFile "Excluding deps $resolved"
    309             grep -Fvx "$resolved" "$filelist" > $filelist.tmp
    310             LogFile "Replacing it with $vanilla_resolved_name"
    311             echo "$vanilla_resolved_name" >> $filelist.tmp
    312             mv -f $filelist.tmp $filelist
     305            if [ "$vanilla_resolved_name" != "$resolved" ]; then
     306                mkdir -p $outdir$resolved> /dev/null 2> /dev/null
     307                rmdir $outdir$resolved > /dev/null 2> /dev/null
     308                ln -sf $vanilla_resolved_name $outdir$resolved
     309                LogFile "Excluding deps $resolved"
     310                grep -Fvx "$resolved" "$filelist" > $filelist.tmp
     311                LogFile "Replacing it with $vanilla_resolved_name"
     312                echo "$vanilla_resolved_name" >> $filelist.tmp
     313                mv -f $filelist.tmp $filelist
     314            fi
    313315        done
    314316        progress=$(($progress+1))
     
    440442    fi
    441443    # Find all files and links (required for some VMWare VMs)
    442     modpaths=`find $1 -name $2.*o -type f -o -type l`
    443     [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.o.gz -type f -o -type l`
    444     [ "$modpaths" = "" ] && modpaths=`find $1 -name $2.ko.gz -type f -o -type l`
    445     [ "$modpaths" = "" ] && modpaths=`find $1 -name $2 -type f -o -type l`
     444    modpaths=`find $1 -name $2.*o -o -name $2.o.gz -o -name $2.ko.gz -o -name $2 -type f -o -type l`
    446445    echo "$modpaths"
    447446}
     
    22292228    done
    22302229
    2231     for i in $needed_modules ; do
    2232         [ -e "$i" ] && s=`du -sk $i | cut -f1` || s=""
    2233         LogFile "Adding $i ($s KB) to the rootfs"
    2234         echo $i >> $MINDI_TMP/cp.lis
     2230    for i in `echo $needed_modules  | tr ' ' '\n' | sort -u`; do
     2231        grep -qE '^$i$' $MINDI_TMP/cp.lis
     2232        if [ $? != 0 ]; then
     2233            [ -e "$i" ] && s=`du -sk $i | cut -f1` || s=""
     2234            LogFile "Adding $i ($s KB) to the rootfs"
     2235            echo $i >> $MINDI_TMP/cp.lis
     2236        fi
    22352237    done
    22362238
     
    22442246    cat $MINDI_CACHE/mountlist.txt >> $LOGFILE
    22452247    LogFile "-----------------------------------"
    2246 
    2247     if [ ! -e "/sbin/devfsd" ] ; then
    2248         LogFile "Deleting devfsd daemon from ramdisk because /sbin/devfsd not found"
    2249         echo ./sbin/devfsd >> $MINDI_TMP/rm.lis
    2250     fi
    22512248
    22522249    cd $old_pwd
Note: See TracChangeset for help on using the changeset viewer.