Invert the logic for downloading tarballs:

- First upstream url
- Second upstrem ftp
- Last mirror server.
This allows to test whether upstream links are alive
This commit is contained in:
Pierre Labastie 2017-02-27 14:00:04 +00:00
parent 1cf1ad6fa6
commit ed4f11f2a7

View file

@ -222,21 +222,23 @@ cd $UNPACKDIR

<xsl:text> $</xsl:text>
<xsl:value-of select="$varname"/>
<xsl:text>&#xA; else&#xA;</xsl:text>
<!-- The FTP_SERVER mirror -->
<!-- Download from upstream http -->
<xsl:if test="string-length($httpurl) &gt; 10">
<xsl:text> wget -T 30 -t 5 </xsl:text>
<xsl:value-of select="$httpurl"/>
<xsl:text> ||&#xA;</xsl:text>
</xsl:if>
<!-- Download from upstream ftp -->
<xsl:if test="string-length($ftpurl) &gt; 10">
<xsl:text> wget -T 30 -t 5 </xsl:text>
<xsl:value-of select="$ftpurl"/>
<xsl:text> ||&#xA;</xsl:text>
</xsl:if>
<!-- The FTP_SERVER mirror as a last resort -->
<xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text>
<xsl:value-of select="$first_letter"/>
<xsl:text>/$</xsl:text>
<xsl:value-of select="$varname"/>
<xsl:if test="string-length($httpurl) &gt; 10">
<xsl:text> ||
wget -T 30 -t 5 </xsl:text>
<xsl:value-of select="$httpurl"/>
</xsl:if>
<xsl:if test="string-length($ftpurl) &gt; 10">
<xsl:text> ||
wget -T 30 -t 5 </xsl:text>
<xsl:value-of select="$ftpurl"/>
</xsl:if>
<xsl:text>
cp $</xsl:text>
<xsl:value-of select="$varname"/>