]> git.donarmstrong.com Git - cran2deb.git/blobdiff - trunk/R/debiannaming.R
the binary should always have the same name as the source package
[cran2deb.git] / trunk / R / debiannaming.R
index 83c0ab58cf430782c2bb1e9c5b289832c4bd227e..724bca3a0ea4386a69383a15c44375ca685936cc 100644 (file)
@@ -2,9 +2,12 @@ repourl_as_debian <- function(url) {
     # map the url to a repository onto its name in debian package naming
     if (length(grep('cran',url))) {
         return('cran')
-    }
-    if (length(grep('bioc',url))) {
+    } else if (length(grep('bioc',url))) {
         return('bioc')
+    } else if (length(grep('omegahat',url))) {
+        return('omegahat')
+    } else if (length(grep('rforge',url))) {
+        return('rforge')
     }
     fail('unknown repository',url)
 }
@@ -28,21 +31,16 @@ pkgname_as_debian <- function(name,repopref=NULL,version=NULL,binary=T,build=F)
     } else {
         # XXX: data.frame rownames are unique, so always override repopref for
         #      now.
-        if (!(name %in% rownames(available))) {
-            bundle <- r_bundle_of(name)
-            if (!is.null(bundle)) {
-                name <- bundle
-            }
-        }
         debname = tolower(name)
-        if (binary) {
+### The source name should always be the same as the binary name
+###        if (binary) {
             if (name %in% rownames(available)) {
                 repopref <- tolower(repourl_as_debian(available[name,'Repository']))
             } else if (is.null(repopref)) {
                 repopref <- 'unknown'
             }
             debname = paste('r',repopref,debname,sep='-')
-        }
+###        }
     }
     if (!is.null(version) && length(version) > 1) {
         debname = paste(debname,' (',version,')',sep='')