From 104ff67383868f720b67141c96522f6b8bb2154d Mon Sep 17 00:00:00 2001 From: blundellc Date: Sat, 16 May 2009 10:38:39 +0000 Subject: [PATCH] add some output to aid package debugging. after upload, wait (for at most 60 seconds) for mini-dinstall to get to work by checking for the appearance of the source tarball. git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@234 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- trunk/R/build.R | 12 ++++++++++++ trunk/R/debcontrol.R | 1 + trunk/R/getrpkg.R | 2 ++ 3 files changed, 15 insertions(+) diff --git a/trunk/R/build.R b/trunk/R/build.R index 157c888..fead6d8 100644 --- a/trunk/R/build.R +++ b/trunk/R/build.R @@ -42,6 +42,18 @@ build <- function(name,extra_deps,force=F) { fail('upload failed!') } + # wait for mini-dinstall to get to work + upload_success = FALSE + for (i in seq(1,12)) { + if (file.exists(file.path(pbuilder_results, paste(pkg$srcname, '_', pkg$version, '.orig.tar.gz', sep='')))) { + upload_success = TRUE + break + } + Sys.sleep(5) + } + if (!upload_success) { + warn('upload took too long; continuing as normal (some builds may fail temporarily)') + } return(pkg$debversion) })()) cleanup(dir) diff --git a/trunk/R/debcontrol.R b/trunk/R/debcontrol.R index 34cc6b6..4b7b4f9 100644 --- a/trunk/R/debcontrol.R +++ b/trunk/R/debcontrol.R @@ -166,5 +166,6 @@ generate_control <- function(pkg) { # Debian policy says 72 char width; indent minimally write.dcf(control,file=pkg$debfile('control.in'),indent=1,width=72) + write.dcf(control,indent=1,width=72) } diff --git a/trunk/R/getrpkg.R b/trunk/R/getrpkg.R index 0c2e48b..b5e990f 100644 --- a/trunk/R/getrpkg.R +++ b/trunk/R/getrpkg.R @@ -39,6 +39,7 @@ download_pkg <- function(dir, pkgname) { pkg$archive <- file.path(dir, basename(debfn)) file.copy(debfn,pkg$archive) pkg$path = file.path(dir, paste(pkg$srcname ,pkg$version ,sep='-')) + notice('using an existing debianized source tarball:',debfn) } else { # see if we have a local mirror in /srv/R use_local = FALSE @@ -82,6 +83,7 @@ download_pkg <- function(dir, pkgname) { repack_pkg <- function(pkg) { # re-pack into a Debian-named archive with a Debian-named directory. + notice('repacking into debian source archive.') debpath = file.path(dirname(pkg$archive) ,paste(pkg$srcname ,pkg$version -- 2.39.5