]> git.donarmstrong.com Git - cran2deb.git/commitdiff
1cran<rev> instead of <rev>cran1
authorblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 14 Jun 2009 16:44:25 +0000 (16:44 +0000)
committerblundellc <blundellc@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 14 Jun 2009 16:44:25 +0000 (16:44 +0000)
git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@244 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

trunk/R/version.R

index 0dffa19830cae724b9779a8b4787a37936815bb1..41693e64adf2ebc63ed4aa8c446857afd86e8ceb 100644 (file)
@@ -26,7 +26,7 @@ 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,version_suffix,version_suffix_step,sep=''))
+    return(paste(pkgver,'-',version_suffix_step,version_suffix,debian_revision,sep=''))
 }
 
 version_epoch <- function(pkgver) {
@@ -40,7 +40,7 @@ version_epoch <- function(pkgver) {
 
 version_revision <- function(pkgver) {
     # return the Debian revision of a Debian package version
-    return(as.integer(sub(paste('.*-([0-9]+)(',version_suffix,'[0-9]+)?$',sep=''),'\\1',pkgver)))
+    return(as.integer(sub(paste('.*-([0-9]+',version_suffix,'[0-9]+)?([0-9]+)$',sep=''),'\\2',pkgver)))
 }
 # version_revision . version_new(x) = id
 # version_revision(version_new(x)) = 1