Author: Charles Blundell <blundellc@gmail.com>, with assistance from Dirk Eddelbuettel <>
Maintainer: Charles Blundell <blundellc@gmail.com>
Depends: ctv, utils, RSQLite, DBI, digest
-SystemRequirements: littler, rc, pbuilder, debian toolchain, web server, mini-dinstall
+SystemRequirements: littler, rc, pbuilder, debian toolchain, web server, mini-dinstall, curl
Description: Convert CRAN packages into Debian packages, mostly unassisted, easily
subverting the R package system.
License: GPL-3
}
pkgname <- bundle
}
- archive <- download.packages(pkgname, dir, available=available, repos='', type="source")[1,2]
+ # use this instead of download.packages as it is more resilient to
+ # dodgy network connections (hello BT 'OpenWorld', bad ISP)
+ fn <- paste(pkgname, '_', available[pkgname,'Version'], '.tar.gz', sep='')
+ url <- paste(available[pkgname,'Repository'], fn, sep='/')
+ archive <- file.path(dir, fn)
+ # don't log the output -- we don't care!
+ ret <- system(paste('curl','-o',shQuote(archive),'-m 60 --retry 5',shQuote(url)))
+ if (ret != 0) {
+ fail('failed to download',url)
+ }
+ # end of download.packages replacement
+# archive <- download.packages(pkgname, dir, available=available, repos='', type="source")[1,2]
if (length(grep('\\.\\.',archive)) || normalizePath(archive) != archive) {
fail('funny looking path',archive)
}