]> git.donarmstrong.com Git - cran2deb.git/commitdiff
version suffix
authorblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 14 Jun 2009 12:32:57 +0000 (12:32 +0000)
committerblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 14 Jun 2009 12:32:57 +0000 (12:32 +0000)
git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@240 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

trunk/R/build.R
trunk/R/version.R
trunk/R/zzz.R

index 6e8f5e54f9c402254d68f475062a6638998c3292..ad3892ad1124c9fa6c8f07e0955b5e73e30fe60a 100644 (file)
@@ -44,13 +44,14 @@ build <- function(name,extra_deps,force=F) {
 
         # 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)')
index 184ec2380bfa8944dc73fffcebf8d185bd361172..0dffa19830cae724b9779a8b4787a37936815bb1 100644 (file)
@@ -26,28 +26,28 @@ version_new <- function(rver,debian_revision=1, debian_epoch=db_get_base_epoch()
 
     # 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
 
index 0c01a3b47268a2f2c71007aa3f99f690da052ad6..aee18cd3147ef5c6f9a2e49d954e6b00edd4a109 100644 (file)
@@ -21,6 +21,9 @@
                         ,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)) {