Changeset 7a100d96


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.

Location:
common
Files:
2 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
  • common/urls.xsl

    reb0837b r7a100d96  
    4242      <xsl:variable name="dirname" select="substring-before($package2, '-0')"/>
    4343      <!-- Write the upstream URLs, except the redirected ones -->
    44       <xsl:if test="not(contains(@url,'?'))">
    45         <xsl:value-of select="@url"/>
    46       </xsl:if>
     44      <xsl:choose>
     45        <xsl:when test="contains(@url,'?')">
     46          <xsl:text>dummy-url</xsl:text>
     47        </xsl:when>
     48        <xsl:otherwise>
     49          <xsl:value-of select="@url"/>
     50        </xsl:otherwise>
     51      </xsl:choose>
    4752      <xsl:text> </xsl:text>
     53      <!-- Write FTP mirror URLs -->
    4854      <xsl:value-of select="$server"/>
    4955      <xsl:text>/pub/lfs/conglomeration/</xsl:text>
     
    7581      </xsl:choose>
    7682      <xsl:value-of select="$package"/>
     83      <!-- Write MD5SUM value -->
     84      <xsl:text> </xsl:text>
     85      <xsl:value-of select="../../para[3]/literal"/>
    7786      <xsl:text>&#x0a;</xsl:text>
    7887    </xsl:if>
Note: See TracChangeset for help on using the changeset viewer.