X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trunk%2FR%2Fbuild.R;h=540610f2fda99fb14ffb37f82c954f350bd91641;hb=01d5d539cb2ccb4840ee1f2d88beeb0381740e72;hp=ad3892ad1124c9fa6c8f07e0955b5e73e30fe60a;hpb=d71a9f7db60107a98b1e30fd0e886766169cdf8e;p=cran2deb.git diff --git a/trunk/R/build.R b/trunk/R/build.R index ad3892a..540610f 100644 --- a/trunk/R/build.R +++ b/trunk/R/build.R @@ -1,5 +1,5 @@ -build <- function(name,extra_deps,force=F) { +build <- function(name,extra_deps,force=F,do_cleanup=T) { # can't, and hence don't need to, build base packages if (name %in% base_pkgs) { return(T) @@ -44,21 +44,25 @@ build <- function(name,extra_deps,force=F) { # wait for mini-dinstall to get to work upload_success = FALSE - for (i in seq(1,60)) { - if (file.exists(file.path(dinstall_archive,'testing','source',paste(pkg$srcname, '_', pkg$version, '.orig.tar.gz', sep='')))) { + for (i in seq(1,12)) { + if (file.exists(file.path(dinstall_archive,'testing',paste(pkg$srcname, '_', pkg$version, '.orig.tar.gz', sep='')))) { upload_success = TRUE break } - warn(i,'/60: does not exist',file.path(dinstall_archive,which_system,'testing','source',paste(pkg$srcname, '_', pkg$version, '.orig.tar.gz', sep=''))) + warn(i,'/12: does not exist',file.path(dinstall_archive,'testing',paste(pkg$srcname, '_', pkg$version, '.orig.tar.gz', sep=''))) - Sys.sleep(1) + Sys.sleep(5) } if (!upload_success) { warn('upload took too long; continuing as normal (some builds may fail temporarily)') } return(pkg$debversion) })()) - cleanup(dir) + if (do_cleanup) { + cleanup(dir) + } else { + notice('output is in',dir,'. you must clean this up yourself.') + } if (is.null(result)) { # nothing was done so escape asap. return(result) @@ -90,7 +94,7 @@ needs_build <- function(name,version) { notice('rebuilding',name,': no build record or previous build failed') return(T) } - # see if it has already been built + # see if it has already been built *and* successfully uploaded srcname <- pkgname_as_debian(name,binary=F) debname <- pkgname_as_debian(name,binary=T) if (file.exists(changesfile(srcname, version))) {