]> git.donarmstrong.com Git - cran2deb.git/blobdiff - trunk/R/build.R
explain why needs_build does this
[cran2deb.git] / trunk / R / build.R
index 157c888738ffb2ada70c6de4a2f54505c74d3456..74479fb9173c78db5c0f6b5033192a89fc76e31a 100644 (file)
@@ -42,6 +42,20 @@ 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,60)) {
+            if (file.exists(file.path(dinstall_archive,'testing','source',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='')))
+
+            Sys.sleep(1)
+        }
+        if (!upload_success) {
+            warn('upload took too long; continuing as normal (some builds may fail temporarily)')
+        }
         return(pkg$debversion)
     })())
     cleanup(dir)
@@ -76,7 +90,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))) {