Changeset 3166


Ignore:
Timestamp:
Jul 25, 2013, 10:01:05 PM (6 years ago)
Author:
bruno
Message:
  • Fix mindi for Mageia 3 with no /bin and /lib under / but relocated under /usr (should also fix #656 for Fedora)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/mindi

    r3163 r3166  
    297297            d=`dirname "$d"`
    298298        done
    299         if [ -d "$incoming" ]; then
     299        if [ -d "$incoming" -a ! -h "$incoming" ]; then
    300300            find $incoming/* -maxdepth 0 2> /dev/null | CopyDependenciesToDirectory $outdir 0
    301301        elif [ -e "$incoming" ] && [ $found = "false" ]; then
     
    903903    link=`readlink $file`
    904904    d=`dirname $file`
     905    # Is link a relative or full path name
    905906    fchar=`echo $link | cut -c1`
    906907    # If mother dir is a link print it
    907908    if [ -h "$d" ]; then
    908909        echo "$d"
    909         d=`readlink $d`
     910        d2=`readlink $d`
     911        c2=`echo $d2 |  | cut -c1`
     912        if [ "$c2" != "/" ]; then
     913            if [ "$c2" != "." ]; then
     914                d="/$d2"
     915            else
     916                d="$d/$d2"
     917            fi
     918        fi
    910919    fi
    911920    if [ "$fchar" != "/" ]; then
     
    21032112        cp -f $MINDI_TMP/mondo-restore.cfg $bigdir/tmp &> /dev/null
    21042113    fi
    2105     [ -d "/mnt/.boot.d" ] && echo "Oh Jebus" > $bigdir/tmp/DUMBASS-GENTOO
     2114    [ -d "/mnt/.boot.d" ] && echo "GENTOO" > $bigdir/tmp/DUMBASS-GENTOO
    21062115    DropOptimizedLibraries $needlist $bigdir
    21072116    echo -en "Assembling dependency files"
     
    25652574    # Remove directories from the list, as tar will create them anyway
    25662575    # and it may hurt if /lib is in it as on Debian/Ubuntu
     2576    # recent bash says that -d is true for a link to a dir !
    25672577    for f in `sort -u $MINDI_TMP/minimal.lis`; do
    2568         if [ ! -d $f ]; then
     2578        if [ -e $f -a ! -d $f ] || [ -h $f ]; then
    25692579            finallist="$finallist $f"
    25702580        fi
     
    27242734    for d in "/lib" "/usr/lib"; do
    27252735        if [ -d "$d/firmware" ]; then
    2726             cp -rp "$d/firmware" "$mountpoint/$d"
     2736            cp -a "$d/firmware" "$mountpoint/$d"
    27272737        fi
    27282738    done
     
    27312741    for d in "/lib" "/usr/lib" "/lib64" "/usr/lib64"; do
    27322742        if [ -d "$d/multipath" ]; then
    2733             cp -rp "$d/multipath" "$mountpoint/$d"
     2743            cp -a "$d/multipath" "$mountpoint/$d"
    27342744        fi
    27352745    done
Note: See TracChangeset for help on using the changeset viewer.