Ignore:
Timestamp:
05/06/2006 08:04:45 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
experimental
Children:
50b9f16
Parents:
eb0837b
Message:

Merged r2658 from trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    reb0837b r7a100d96  
    647647#----------------------------#
    648648  local saveIFS=$IFS
    649   local IFS line URL1 URL2 FILE MD5 HAVEMD5 fromARCHIVE
     649  local IFS line URL1 URL2 FILE BOOKMD5 MD5 HAVEMD5 fromARCHIVE
    650650
    651651    # Test if the packages must be downloaded
     
    687687    URL1=`echo $line | cut -d" " -f2` # Preferred URL
    688688    URL2=`echo $line | cut -d" " -f1` # Fallback Upstream URL
    689     FILE=`basename $URL2` # File name
    690 
    691       # Find the md5 sum for this package.
    692     set +e
    693     HAVEMD5=1  # Always assume we have a MD5SUM
    694     MD5=`grep "  $FILE" MD5SUMS`
    695     if [ $? -ne 0 ]; then
    696       set -e
    697       gs_wrt_message "$FILE not found in MD5SUMS"
    698         # IMPORTANT:: There is no MD5SUM for this file.
    699       HAVEMD5=0
     689    FILE=`basename $URL1` # File name
     690    BOOKMD5=`echo $line | cut -d" " -f3` # MD5 book value
     691
     692    if [[ x"$BOOKMD5" != "x" ]]; then
     693      HAVEMD5=1
     694      MD5="$BOOKMD5  $FILE"
     695    else
     696      # Find the md5 sum for this package in the server MD5SUMS file.
     697      set +e
     698      HAVEMD5=1  # Always assume we have a MD5SUM
     699      MD5=`grep "  $FILE" MD5SUMS`
     700      if [ $? -ne 0 ]; then
     701        set -e
     702        gs_wrt_message "$FILE not found in MD5SUMS"
     703          # IMPORTANT:: There is no MD5SUM for this file.
     704        HAVEMD5=0
     705      fi
    700706    fi
    701707
Note: See TracChangeset for help on using the changeset viewer.