# wait for mini-dinstall to get to work
upload_success = FALSE
- for (i in seq(1,12)) {
+ 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,'/12: does not exist',file.path(dinstall_archive,which_system,'testing','source',paste(pkg$srcname, '_', pkg$version, '.orig.tar.gz', sep='')))
- Sys.sleep(5)
+ 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)')
# always add the '-1' Debian release; nothing is lost and rarely will R
# packages be Debian packages without modification.
- return(paste(pkgver,'-',debian_revision,sep=''))
+ return(paste(pkgver,'-',debian_revision,version_suffix,version_suffix_step,sep=''))
}
version_epoch <- function(pkgver) {
# return the Debian epoch of a Debian package version
if (!length(grep(':',pkgver)))
return(0)
- return(as.integer(sub('^([0-9]+):.*','\\1',pkgver)))
+ return(as.integer(sub('^([0-9]+):.*$','\\1',pkgver)))
}
# version_epoch . version_new(x,y) = id
# version_epoch(version_new(x,y)) = base_epoch
version_revision <- function(pkgver) {
# return the Debian revision of a Debian package version
- return(as.integer(sub('.*-([0-9]+)$','\\1',pkgver)))
+ return(as.integer(sub(paste('.*-([0-9]+)(',version_suffix,'[0-9]+)?$',sep=''),'\\1',pkgver)))
}
# version_revision . version_new(x) = id
# version_revision(version_new(x)) = 1
version_upstream <- function(pkgver) {
# return the upstream version of a Debian package version
- return(sub('-[0-9]+$','',sub('^[0-9]+:','',pkgver)))
+ return(sub('-[a-zA-Z0-9+.~]+$','',sub('^[0-9]+:','',pkgver)))
}
# version_upstream . version_new = id
,paste(srcname,'_',version,'_'
,host_arch,'.changes',sep='')))
})
+ global("version_suffix","cran")
+ # perhaps db_cur_version() should be used instead?
+ global("version_suffix_step",1)
cache <- file.path(cache_root,'cache.rda')
if (file.exists(cache)) {