From ff5fa2262544332700761a420bc4ceca9a11c7a2 Mon Sep 17 00:00:00 2001 From: moeller Date: Sat, 12 Feb 2011 19:42:29 +0000 Subject: [PATCH] For the largish BioConductor files one has (even with good connects) download times of 45 minutes, easily. Retries are found not to be necessary, limit set to 60. One does not not want to try again in an unsupervised manner after dropping 500MBs of download because of a time limit, retries hence set to 0. git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@357 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- trunk/R/getrpkg.R | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/trunk/R/getrpkg.R b/trunk/R/getrpkg.R index 9c87c37..02266c4 100644 --- a/trunk/R/getrpkg.R +++ b/trunk/R/getrpkg.R @@ -1,3 +1,7 @@ + +curl.maxtime<-60*60 # 60 minutes max download time (some bioconductor packages are truly big and take time) +curl.retries<-0 # No retries (connections are commonly good enough) + setup <- function() { # set up the working directory tmp <- tempfile('cran2deb') @@ -61,7 +65,9 @@ download_pkg <- function(dir, pkgname) { # dodgy network connections (hello BT 'OpenWorld', bad ISP) url <- paste(available[pkgname,'Repository'], fn, sep='/') # don't log the output -- we don't care! - ret <- system(paste('curl','-o',shQuote(archive),'-m 720 --retry 5',shQuote(url))) + ret <- system(paste('curl','-o',shQuote(archive), + paste('-m',curl.maxtime,'--retry',curl.retries,sep=' '), + shQuote(url))) if (ret != 0) { fail('failed to download',url) } -- 2.39.2