+ # upload the package
+# notice("Package upload")
+## ret = log_system('umask 002;dput','-c',shQuote(dput_config),'local' ,changesfile(pkg$srcname,pkg$debversion))
+
+### cmd = paste('umask 002; cd /var/www/cran2deb/rep && reprepro -b . include testing', changesfile(pkg$srcname,pkg$debversion),sep=" ")
+### #if (verbose) notice('Executing: ',cmd)
+### ret = log_system(cmd)
+### if (ret != 0) {
+### #fail('upload failed!')
+### notice("Upload failed, ignored.")
+### } else {
+### notice("Upload successful.")
+### }
+## # wait for mini-dinstall to get to work
+## upload_success = FALSE
+## 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,'/12: does not exist',file.path(dinstall_archive,'testing',paste(pkg$srcname, '_', pkg$version, '.orig.tar.gz', sep='')))
+
+## Sys.sleep(5)
+## }
+## if (!upload_success) {
+## warn('upload took too long; continuing as normal (some builds may fail temporarily)')
+## }