Author: jfrederic.clere(a)jboss.com
Date: 2007-09-03 04:31:47 -0400 (Mon, 03 Sep 2007)
New Revision: 967
Modified:
trunk/build/unix/build.sh
trunk/build/unix/package.list
Log:
Allow a backup URL (
archive.apache.org for example).
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2007-09-03 08:22:55 UTC (rev 966)
+++ trunk/build/unix/build.sh 2007-09-03 08:31:47 UTC (rev 967)
@@ -267,10 +267,19 @@
# Download the sources. It guess how to do it.
# $1: URL.
+# $1: Back URL. (archive for apache)
downloadtaredsrc()
{
URL=$1
+ URLBACK=$2
+ if [ -z $URLBACK ]; then
+ URLBACK=$URL
+ fi
wget --tries=0 --retry-connrefused $URL
+ if [ $? -ne 0 ]; then
+ echo "downloadtaredsrc Retrying on $URLBACK"
+ wget --tries=0 --retry-connrefused $URLBACK
+ fi
fname=`basename $URL`
case ${fname} in
*.tar.gz)
@@ -568,13 +577,15 @@
# Check and download
# $1 directory of the checkout directory
# $2 url for the download
+# $3 backup url for the download
ckeckdownload()
{
src_dir=$1
src_url=$2
+ src_url_back=$3
cd $build_cache_dir
if [ ! -d ${src_dir} ]; then
- downloadtaredsrc $src_url
+ downloadtaredsrc $src_url $src_url_back
applypatch $src_dir
fi
cp -rp ${src_dir} ${package_src_dir}/srclib
@@ -585,19 +596,23 @@
if $BUILD_WIN ; then
APRURL=http://ftp.heanet.ie/mirrors/www.apache.org/dist/apr/apr-${apr_ver...
APUURL=http://ftp.heanet.ie/mirrors/www.apache.org/dist/apr/apr-util-${ap...
+
APRURLBACK=http://archive.apache.org/dist/apr/apr-${apu_version}-win32-sr...
+
APUURLBACK=http://archive.apache.org/dist/apr/apr-util-${apu_version}-win...
else
APRURL=http://ftp.heanet.ie/mirrors/www.apache.org/dist/apr/apr-${apr_ver...
APUURL=http://ftp.heanet.ie/mirrors/www.apache.org/dist/apr/apr-util-${ap...
+
APRURLBACK=http://archive.apache.org/dist/apr/apr-${apr_version}.tar.gz
+
APUURLBACK=http://archive.apache.org/dist/apr/apr-util-${apu_version}.tar.gz
fi
SSLURL=http://www.openssl.org/source/openssl-${ssl_version}.tar.gz
rm -rf ${package_src_dir}
mkdir -p ${package_src_dir}/srclib
-ckeckdownload apr-${apr_version} $APRURL
-ckeckdownload apr-util-${apu_version} $APUURL
+ckeckdownload apr-${apr_version} $APRURL $APRURLBACK
+ckeckdownload apr-util-${apu_version} $APUURL $APUURLBACK
if $has_openssl; then
- ckeckdownload openssl-${ssl_version} $SSLURL
+ ckeckdownload openssl-${ssl_version} $SSLURL ""
fi
#
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2007-09-03 08:22:55 UTC (rev 966)
+++ trunk/build/unix/package.list 2007-09-03 08:31:47 UTC (rev 967)
@@ -1,4 +1,7 @@
# list of the packages
# add new versions of package after existing ones.
-jboss-native|2.0.2|1.2.8|1.2.8|0.9.8e|TOMCAT_NATIVE_1_1_11
-jboss-sight|1.0.0|1.2.8|1.2.8||trunk
+jboss-native|2.0.2|1.2.9|1.2.8|0.9.8e|TOMCAT_NATIVE_1_1_11
+jboss-native|2.0.3|1.2.8|1.2.8|0.9.8e|TOMCAT_NATIVE_1_1_11
+# SIGHT
+jboss-sight|1.0.0|1.2.9|1.2.8||trunk
+jboss-sight|1.0.1|1.2.8|1.2.8||trunk