Added support for MD5 values sets into the book sources.
This commit is contained in:
parent
d29584bb22
commit
26053c44b2
2 changed files with 29 additions and 14 deletions
|
@ -640,7 +640,7 @@ extract_commands() { #
|
||||||
get_sources() { # Download file, write name to MISSING_FILES.DMP if an error
|
get_sources() { # Download file, write name to MISSING_FILES.DMP if an error
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
local saveIFS=$IFS
|
local saveIFS=$IFS
|
||||||
local IFS line URL1 URL2 FILE MD5 HAVEMD5 fromARCHIVE
|
local IFS line URL1 URL2 FILE BOOKMD5 MD5 HAVEMD5 fromARCHIVE
|
||||||
|
|
||||||
# Test if the packages must be downloaded
|
# Test if the packages must be downloaded
|
||||||
[ ! "$GETPKG" = "1" ] && return
|
[ ! "$GETPKG" = "1" ] && return
|
||||||
|
@ -680,9 +680,14 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if
|
||||||
# Locations
|
# Locations
|
||||||
URL1=`echo $line | cut -d" " -f2` # Preferred URL
|
URL1=`echo $line | cut -d" " -f2` # Preferred URL
|
||||||
URL2=`echo $line | cut -d" " -f1` # Fallback Upstream URL
|
URL2=`echo $line | cut -d" " -f1` # Fallback Upstream URL
|
||||||
FILE=`basename $URL2` # File name
|
FILE=`basename $URL1` # File name
|
||||||
|
BOOKMD5=`echo $line | cut -d" " -f3` # MD5 book value
|
||||||
|
|
||||||
# Find the md5 sum for this package.
|
if [[ x"$BOOKMD5" != "x" ]]; then
|
||||||
|
HAVEMD5=1
|
||||||
|
MD5="$BOOKMD5 $FILE"
|
||||||
|
else
|
||||||
|
# Find the md5 sum for this package in the server MD5SUMS file.
|
||||||
set +e
|
set +e
|
||||||
HAVEMD5=1 # Always assume we have a MD5SUM
|
HAVEMD5=1 # Always assume we have a MD5SUM
|
||||||
MD5=`grep " $FILE" MD5SUMS`
|
MD5=`grep " $FILE" MD5SUMS`
|
||||||
|
@ -692,6 +697,7 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if
|
||||||
# IMPORTANT:: There is no MD5SUM for this file.
|
# IMPORTANT:: There is no MD5SUM for this file.
|
||||||
HAVEMD5=0
|
HAVEMD5=0
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
# If the file exists in the archive copy it to the
|
# If the file exists in the archive copy it to the
|
||||||
|
|
|
@ -41,10 +41,16 @@
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<xsl:variable name="dirname" select="substring-before($package2, '-0')"/>
|
<xsl:variable name="dirname" select="substring-before($package2, '-0')"/>
|
||||||
<!-- Write the upstream URLs, except the redirected ones -->
|
<!-- Write the upstream URLs, except the redirected ones -->
|
||||||
<xsl:if test="not(contains(@url,'?'))">
|
<xsl:choose>
|
||||||
|
<xsl:when test="contains(@url,'?')">
|
||||||
|
<xsl:text>dummy-url</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="@url"/>
|
<xsl:value-of select="@url"/>
|
||||||
</xsl:if>
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
|
<!-- Write FTP mirror URLs -->
|
||||||
<xsl:value-of select="$server"/>
|
<xsl:value-of select="$server"/>
|
||||||
<xsl:text>/pub/lfs/conglomeration/</xsl:text>
|
<xsl:text>/pub/lfs/conglomeration/</xsl:text>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@ -74,6 +80,9 @@
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:value-of select="$package"/>
|
<xsl:value-of select="$package"/>
|
||||||
|
<!-- Write MD5SUM value -->
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
|
<xsl:value-of select="../../para[3]/literal"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
Reference in a new issue